mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 15:11:03 +00:00
Fail safe
This commit is contained in:
parent
4a8041c6f6
commit
eba8725188
2 changed files with 10 additions and 4 deletions
|
@ -395,10 +395,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
View getContentView() {
|
||||
return drawerLayout.getChildAt(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
outState.putBoolean("fair:toggle", drawerToggle.isDrawerIndicatorEnabled());
|
||||
|
@ -731,6 +727,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
View getContentView() {
|
||||
if (drawerLayout == null || drawerLayout.getChildCount() == 0)
|
||||
return null;
|
||||
return drawerLayout.getChildAt(0);
|
||||
}
|
||||
|
||||
private void checkFirst() {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
if (prefs.getBoolean("first", true))
|
||||
|
|
|
@ -4651,7 +4651,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
@Override
|
||||
protected void onExecuted(Bundle args, final ArrayList<MessageTarget> result) {
|
||||
ActivityView activity = (ActivityView) getActivity();
|
||||
if (activity == null)
|
||||
return;
|
||||
View content = activity.getContentView();
|
||||
if (content == null)
|
||||
return;
|
||||
|
||||
// Show undo snackbar
|
||||
final Snackbar snackbar = Snackbar.make(
|
||||
|
|
Loading…
Reference in a new issue