mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-10-29 11:49:33 +00:00
Refresh bottom nav counter even if app is not open (#7970)
This commit is contained in:
parent
ad94f2f647
commit
3fa9607d72
@ -145,6 +145,7 @@ public class MainActivity extends CastEnabledActivity {
|
||||
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
|
||||
}
|
||||
drawerLayout = null;
|
||||
bottomNavigation.onCreateView();
|
||||
} else {
|
||||
bottomNavigation.hide();
|
||||
bottomNavigation = null;
|
||||
@ -337,7 +338,7 @@ public class MainActivity extends CastEnabledActivity {
|
||||
drawerLayout.removeDrawerListener(drawerToggle);
|
||||
}
|
||||
if (bottomNavigation != null) {
|
||||
bottomNavigation.onDestroy();
|
||||
bottomNavigation.onDestroyView();
|
||||
}
|
||||
}
|
||||
|
||||
@ -571,9 +572,6 @@ public class MainActivity extends CastEnabledActivity {
|
||||
super.onStart();
|
||||
EventBus.getDefault().register(this);
|
||||
new RatingDialogManager(this).showIfNeeded();
|
||||
if (bottomNavigation != null) {
|
||||
bottomNavigation.onStart();
|
||||
}
|
||||
getOnBackPressedDispatcher().addCallback(this, openDefaultPageBackPressedCallback);
|
||||
getOnBackPressedDispatcher().addCallback(this, bottomSheetBackPressedCallback);
|
||||
}
|
||||
@ -603,9 +601,6 @@ public class MainActivity extends CastEnabledActivity {
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
EventBus.getDefault().unregister(this);
|
||||
if (bottomNavigation != null) {
|
||||
bottomNavigation.onStop();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -148,15 +148,12 @@ public class BottomNavigation {
|
||||
bottomNavigationView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void onStart() {
|
||||
public void onCreateView() {
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
public void onStop() {
|
||||
public void onDestroyView() {
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
public void onDestroy() {
|
||||
if (bottomNavigationBadgeLoader != null) {
|
||||
bottomNavigationBadgeLoader.dispose();
|
||||
bottomNavigationBadgeLoader = null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user