mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 10:47:28 +00:00
Prevent crash
This commit is contained in:
parent
8ba3d23283
commit
3736601a26
1 changed files with 8 additions and 0 deletions
|
@ -290,6 +290,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.app_name, R.string.app_name) {
|
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.app_name, R.string.app_name) {
|
||||||
public void onDrawerClosed(View view) {
|
public void onDrawerClosed(View view) {
|
||||||
Log.i("Drawer closed");
|
Log.i("Drawer closed");
|
||||||
|
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
||||||
|
return;
|
||||||
|
|
||||||
owner.stop();
|
owner.stop();
|
||||||
|
|
||||||
drawerLayout.setDrawerLockMode(LOCK_MODE_UNLOCKED);
|
drawerLayout.setDrawerLockMode(LOCK_MODE_UNLOCKED);
|
||||||
|
@ -302,6 +305,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
super.onDrawerOpened(drawerView);
|
super.onDrawerOpened(drawerView);
|
||||||
|
|
||||||
Log.i("Drawer opened");
|
Log.i("Drawer opened");
|
||||||
|
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
||||||
|
return;
|
||||||
|
|
||||||
owner.start();
|
owner.start();
|
||||||
|
|
||||||
if (nav_pinned) {
|
if (nav_pinned) {
|
||||||
|
@ -317,6 +323,8 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
|
|
||||||
if (BuildConfig.DEBUG)
|
if (BuildConfig.DEBUG)
|
||||||
Log.i("Drawer slide=" + slideOffset);
|
Log.i("Drawer slide=" + slideOffset);
|
||||||
|
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
||||||
|
return;
|
||||||
|
|
||||||
if (slideOffset > 0)
|
if (slideOffset > 0)
|
||||||
owner.start();
|
owner.start();
|
||||||
|
|
Loading…
Reference in a new issue