Skip to content

Commit

Permalink
Merge pull request #459 from FineFindus/fix/lookup-local-account
Browse files Browse the repository at this point in the history
fix(UiUtils): correctly lookup local account
  • Loading branch information
LucasGGamerM authored Jul 13, 2024
2 parents ffc2990 + 8b26fb3 commit c01135d
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1341,10 +1341,6 @@ public static void openURL(Context context, String accountID, String url) {
openURL(context, accountID, url, true);
}

public static void openURL(Context context, String accountID, String url, Object parentObject) {
openURL(context, accountID, url, !(parentObject instanceof Status || parentObject instanceof Account));
}

public static void openURL(Context context, String accountID, String url, boolean launchBrowser) {
lookupURL(context, accountID, url, (clazz, args) -> {
if (clazz == null) {
Expand Down Expand Up @@ -1462,7 +1458,7 @@ public void onSuccess(SearchResults results) {
return;
}
Optional<Account> account = results.accounts.stream()
.filter(a -> uri.getPath().contains(a.getFullyQualifiedName())).findAny();
.filter(a -> uri.getPath().contains(a.username)).findAny();
if (account.isPresent()) {
args.putParcelable("profileAccount", Parcels.wrap(account.get()));
go.accept(ProfileFragment.class, args);
Expand Down

0 comments on commit c01135d

Please sign in to comment.