From e1d51c881a96cce5e649899e4013a37336823c2d Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 12 Jan 2021 09:07:33 +0100 Subject: [PATCH] Fix crash bug for anonymous repost claim results. Better handle channel repost navigation. --- .../main/java/io/lbry/browser/MainActivity.java | 5 +++++ .../io/lbry/browser/adapter/ClaimListAdapter.java | 2 +- .../browser/ui/findcontent/FileViewFragment.java | 15 ++++++++++----- .../browser/ui/findcontent/ShuffleFragment.java | 3 +-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index c0b84f3e..5816b9bf 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -3402,6 +3402,11 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener return String.format("%s-%d", fragmentClass.getName(), navItemId); } + public void popFragment(Class fragmentClass, int navItemId, Map params) { + String key = buildNavFragmentKey(fragmentClass, navItemId, params); + openNavFragments.remove(key); + } + public void openFragment(Class fragmentClass, boolean allowNavigateBack, int navItemId, Map params) { try { String key = buildNavFragmentKey(fragmentClass, navItemId, params); diff --git a/app/src/main/java/io/lbry/browser/adapter/ClaimListAdapter.java b/app/src/main/java/io/lbry/browser/adapter/ClaimListAdapter.java index 616432c6..9ff60c4a 100644 --- a/app/src/main/java/io/lbry/browser/adapter/ClaimListAdapter.java +++ b/app/src/main/java/io/lbry/browser/adapter/ClaimListAdapter.java @@ -404,7 +404,7 @@ public class ClaimListAdapter extends RecyclerView.Adapter