pull/182/head
M66B 5 years ago
parent 4a8041c6f6
commit eba8725188

@ -395,10 +395,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
fragmentTransaction.commit(); fragmentTransaction.commit();
} }
View getContentView() {
return drawerLayout.getChildAt(0);
}
@Override @Override
protected void onSaveInstanceState(Bundle outState) { protected void onSaveInstanceState(Bundle outState) {
outState.putBoolean("fair:toggle", drawerToggle.isDrawerIndicatorEnabled()); outState.putBoolean("fair:toggle", drawerToggle.isDrawerIndicatorEnabled());
@ -731,6 +727,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }
View getContentView() {
if (drawerLayout == null || drawerLayout.getChildCount() == 0)
return null;
return drawerLayout.getChildAt(0);
}
private void checkFirst() { private void checkFirst() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (prefs.getBoolean("first", true)) if (prefs.getBoolean("first", true))

@ -4651,7 +4651,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override @Override
protected void onExecuted(Bundle args, final ArrayList<MessageTarget> result) { protected void onExecuted(Bundle args, final ArrayList<MessageTarget> result) {
ActivityView activity = (ActivityView) getActivity(); ActivityView activity = (ActivityView) getActivity();
if (activity == null)
return;
View content = activity.getContentView(); View content = activity.getContentView();
if (content == null)
return;
// Show undo snackbar // Show undo snackbar
final Snackbar snackbar = Snackbar.make( final Snackbar snackbar = Snackbar.make(

Loading…
Cancel
Save