From 96606f54fd732295e9f7ed3a15485deac6da7696 Mon Sep 17 00:00:00 2001 From: Javi Rueda Date: Fri, 19 Mar 2021 12:53:32 +0100 Subject: [PATCH] Return current fragment on main activity --- app/src/main/java/io/lbry/browser/MainActivity.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index 50401579..1c11f762 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -2781,12 +2781,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener } private Fragment getCurrentFragment() { - List fragmentList = getSupportFragmentManager().getFragments(); - - if (fragmentList.size() > 0) - return fragmentList.get(fragmentList.size() - 1); - else - return null; + return getSupportFragmentManager().findFragmentById(R.id.content_main); } public void hideActionBar() {