1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 09:47:13 +00:00

Fixed crash on navigating from new email notification

Fixes #39
This commit is contained in:
M66B 2018-08-14 20:48:58 +00:00
parent 89ac44d312
commit a6ed47ac88

View file

@ -68,6 +68,8 @@ public class ActivityView extends ActivityBase implements FragmentManager.OnBack
private ListView drawerList;
private ActionBarDrawerToggle drawerToggle;
private boolean newIntent = false;
static final int REQUEST_VIEW = 1;
static final int REQUEST_UNSEEN = 2;
@ -281,7 +283,7 @@ public class ActivityView extends ActivityBase implements FragmentManager.OnBack
if (intent.getBooleanExtra("setup", false))
intent.getExtras().remove("setup");
else
getSupportFragmentManager().popBackStack("unified", 0);
newIntent = true;
checkIntent(intent);
super.onNewIntent(intent);
}
@ -296,6 +298,11 @@ public class ActivityView extends ActivityBase implements FragmentManager.OnBack
iff.addAction(ACTION_VIEW_MESSAGE);
iff.addAction(ACTION_EDIT_FOLDER);
lbm.registerReceiver(receiver, iff);
if (newIntent) {
newIntent = false;
getSupportFragmentManager().popBackStack("unified", 0);
}
}
@Override