From ed301cafe060de5f3aaae8747f8127a4894ccf96 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Sat, 25 Feb 2023 14:27:21 -0300 Subject: [PATCH] fix(custom-local-timelines): Profile lookup now is more robust and doesn't call the the user's instance unless a click happens --- .../android/ui/displayitems/HeaderStatusDisplayItem.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java index 5cad22da0..744b3bb57 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java @@ -441,6 +441,14 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{ return; } Bundle args=new Bundle(); + if(item.status.reloadWhenClicked){ + UiUtils.lookupAccount(v.getContext(), item.status.account, item.accountID, null, account -> { + args.putString("account", item.accountID); + args.putParcelable("profileAccount", Parcels.wrap(account)); + Nav.go(item.parentFragment.getActivity(), ProfileFragment.class, args); + }); + return; + } args.putString("account", item.accountID); args.putParcelable("profileAccount", Parcels.wrap(item.user)); Nav.go(item.parentFragment.getActivity(), ProfileFragment.class, args);