From 6c5144e323177cb0d708aa36b84437ac4ccbaa96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patric=20Karlstr=C3=B6m?= Date: Tue, 12 Jan 2021 02:11:37 +0100 Subject: [PATCH] Simplify code, not needed to check if collection contains key before trying to remove it --- app/src/main/java/io/lbry/browser/MainActivity.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index 5816b9bf..cc7ffd43 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -818,9 +818,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener public void removeNavFragment(Class fragmentClass, int navItemId) { String key = buildNavFragmentKey(fragmentClass, navItemId, null); - if (openNavFragments.containsKey(key)) { - openNavFragments.remove(key); - } + openNavFragments.remove(key); } public void addFetchChannelsListener(FetchChannelsListener listener) {