Skip to content

Commit e312a4b

Browse files
authored
Fix issue navigating to users profile when instance is a different platform (#997)
1 parent 6c60570 commit e312a4b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/utils/instance.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,17 @@ final RegExp username = RegExp(r'^@?(https?:\/\/)?((?:(?!\/u\/u).)*)@(.*)$');
6767
/// Otherwise, returns null.
6868
Future<String?> getLemmyUser(String text) async {
6969
final RegExpMatch? fullUsernameUrlMatch = fullUsernameUrl.firstMatch(text);
70-
if (fullUsernameUrlMatch != null && fullUsernameUrlMatch.groupCount >= 4 && await isLemmyInstance(fullUsernameUrlMatch.group(4))) {
70+
if (fullUsernameUrlMatch != null && fullUsernameUrlMatch.groupCount >= 4) {
7171
return '${fullUsernameUrlMatch.group(3)}@${fullUsernameUrlMatch.group(4)}';
7272
}
7373

7474
final RegExpMatch? shortUsernameUrlMatch = shortUsernameUrl.firstMatch(text);
75-
if (shortUsernameUrlMatch != null && shortUsernameUrlMatch.groupCount >= 3 && await isLemmyInstance(shortUsernameUrlMatch.group(2))) {
75+
if (shortUsernameUrlMatch != null && shortUsernameUrlMatch.groupCount >= 3) {
7676
return '${shortUsernameUrlMatch.group(3)}@${shortUsernameUrlMatch.group(2)}';
7777
}
7878

7979
final RegExpMatch? usernameMatch = username.firstMatch(text);
80-
if (usernameMatch != null && usernameMatch.groupCount >= 3 && await isLemmyInstance(usernameMatch.group(3))) {
80+
if (usernameMatch != null && usernameMatch.groupCount >= 3) {
8181
return '${usernameMatch.group(2)}@${usernameMatch.group(3)}';
8282
}
8383

0 commit comments

Comments
 (0)