From 023a6c3a49d6b4f9618ec797c8d8ea1a71492b8a Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Sat, 25 Feb 2023 15:39:56 -0300 Subject: [PATCH] fix(custom-local-timelines): Loading threads on custom local timelines now works! --- .../android/fragments/StatusListFragment.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java index 7293a2fac..0ce149cef 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java @@ -18,6 +18,7 @@ import org.joinmastodon.android.model.Status; import org.joinmastodon.android.ui.displayitems.ExtendedFooterStatusDisplayItem; import org.joinmastodon.android.ui.displayitems.FooterStatusDisplayItem; import org.joinmastodon.android.ui.displayitems.StatusDisplayItem; +import org.joinmastodon.android.ui.utils.UiUtils; import org.parceler.Parcels; import java.util.ArrayList; @@ -60,6 +61,18 @@ public abstract class StatusListFragment extends BaseStatusListFragment{ Status status=getContentStatusByID(id); if(status==null) return; + if(status.reloadWhenClicked){ + UiUtils.lookupStatus(getContext(), status, accountID, null, status1 -> { + status1.filterRevealed = true; + Bundle args=new Bundle(); + args.putString("account", accountID); + args.putParcelable("status", Parcels.wrap(status1)); + if(status1.inReplyToAccountId!=null && knownAccounts.containsKey(status1.inReplyToAccountId)) + args.putParcelable("inReplyToAccount", Parcels.wrap(knownAccounts.get(status1.inReplyToAccountId))); + Nav.go(getActivity(), ThreadFragment.class, args); + }); + return; + } status.filterRevealed = true; Bundle args=new Bundle(); args.putString("account", accountID);