Simplify code, not needed to check if collection contains key before trying to remove it

This commit is contained in:
Patric Karlström 2021-01-12 02:11:37 +01:00
parent 258ea4aff6
commit 6c5144e323

View file

@ -818,10 +818,8 @@ 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);
}
}
public void addFetchChannelsListener(FetchChannelsListener listener) {
if (!fetchChannelsListeners.contains(listener)) {