From 03954620f937a89cdb044dcd8baa052dc11f3402 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 20 Aug 2019 15:05:24 +0200 Subject: [PATCH] Ask for reporting in unified inbox only --- .../eu/faircode/email/FragmentMessages.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index e7f6a04bec..e3e719ef65 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -2347,21 +2347,23 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. }; private void checkReporting() { - SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); - if (prefs.getBoolean("crash_reports", false) || - prefs.getBoolean("crash_reports_asked", false)) - return; + if (viewType == AdapterMessage.ViewType.UNIFIED) { + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); + if (prefs.getBoolean("crash_reports", false) || + prefs.getBoolean("crash_reports_asked", false)) + return; - final Snackbar snackbar = Snackbar.make(view, R.string.title_ask_help, Snackbar.LENGTH_INDEFINITE); - snackbar.setAction(R.string.title_info, new View.OnClickListener() { - @Override - public void onClick(View v) { - snackbar.dismiss(); - new FragmentDialogReporting().show(getFragmentManager(), "reporting"); - } - }); + final Snackbar snackbar = Snackbar.make(view, R.string.title_ask_help, Snackbar.LENGTH_INDEFINITE); + snackbar.setAction(R.string.title_info, new View.OnClickListener() { + @Override + public void onClick(View v) { + snackbar.dismiss(); + new FragmentDialogReporting().show(getFragmentManager(), "reporting"); + } + }); - snackbar.show(); + snackbar.show(); + } } @Override