Ask for reporting in unified inbox only

pull/161/head
M66B 6 years ago
parent 38b26d9baf
commit 03954620f9

@ -2347,21 +2347,23 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
}; };
private void checkReporting() { private void checkReporting() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); if (viewType == AdapterMessage.ViewType.UNIFIED) {
if (prefs.getBoolean("crash_reports", false) || SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
prefs.getBoolean("crash_reports_asked", false)) if (prefs.getBoolean("crash_reports", false) ||
return; prefs.getBoolean("crash_reports_asked", false))
return;
final Snackbar snackbar = Snackbar.make(view, R.string.title_ask_help, Snackbar.LENGTH_INDEFINITE); final Snackbar snackbar = Snackbar.make(view, R.string.title_ask_help, Snackbar.LENGTH_INDEFINITE);
snackbar.setAction(R.string.title_info, new View.OnClickListener() { snackbar.setAction(R.string.title_info, new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
snackbar.dismiss(); snackbar.dismiss();
new FragmentDialogReporting().show(getFragmentManager(), "reporting"); new FragmentDialogReporting().show(getFragmentManager(), "reporting");
} }
}); });
snackbar.show(); snackbar.show();
}
} }
@Override @Override

Loading…
Cancel
Save