Added lifecycle for pinned nav menu

This commit is contained in:
M66B 2022-03-30 20:14:54 +02:00
parent fe5d3177dc
commit 2fc76b481f
1 changed files with 8 additions and 0 deletions

View File

@ -1021,6 +1021,11 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
iff.addAction(ACTION_EDIT_RULE); iff.addAction(ACTION_EDIT_RULE);
lbm.registerReceiver(receiver, iff); lbm.registerReceiver(receiver, iff);
boolean open = drawerLayout.isDrawerOpen(drawerContainer);
Log.i("Drawer resume open=" + open);
if (open)
owner.start();
ServiceSynchronize.state(this, true); ServiceSynchronize.state(this, true);
checkUpdate(false); checkUpdate(false);
@ -1034,6 +1039,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this); LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);
lbm.unregisterReceiver(receiver); lbm.unregisterReceiver(receiver);
Log.i("Drawer pause");
owner.stop();
ServiceSynchronize.state(this, false); ServiceSynchronize.state(this, false);
} }