Simplify code, not needed to check if collection contains key before trying to remove it
This commit is contained in:
parent
258ea4aff6
commit
6c5144e323
1 changed files with 1 additions and 3 deletions
|
@ -818,10 +818,8 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
|
|
||||||
public void removeNavFragment(Class fragmentClass, int navItemId) {
|
public void removeNavFragment(Class fragmentClass, int navItemId) {
|
||||||
String key = buildNavFragmentKey(fragmentClass, navItemId, null);
|
String key = buildNavFragmentKey(fragmentClass, navItemId, null);
|
||||||
if (openNavFragments.containsKey(key)) {
|
|
||||||
openNavFragments.remove(key);
|
openNavFragments.remove(key);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void addFetchChannelsListener(FetchChannelsListener listener) {
|
public void addFetchChannelsListener(FetchChannelsListener listener) {
|
||||||
if (!fetchChannelsListeners.contains(listener)) {
|
if (!fetchChannelsListeners.contains(listener)) {
|
||||||
|
|
Loading…
Reference in a new issue