From 4ab16ce1a3f5e0f18781c8340789aec975fb717b Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 4 Nov 2021 07:26:37 +0100 Subject: [PATCH] Enabled conversation actions by default on Google devices only --- app/src/main/java/eu/faircode/email/AdapterMessage.java | 2 +- app/src/main/java/eu/faircode/email/ApplicationEx.java | 6 ++---- .../java/eu/faircode/email/FragmentOptionsBehavior.java | 2 +- app/src/main/java/eu/faircode/email/Helper.java | 4 ++++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index a92902d3b7..777c80cd75 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -2764,7 +2764,7 @@ public class AdapterMessage extends RecyclerView.Adapter= Build.VERSION_CODES.O && !BuildConfig.DEBUG) editor.remove("background_service"); diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java b/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java index 405ed3ad96..7bff40ef48 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java @@ -495,7 +495,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe swSyncOnlaunch.setChecked(prefs.getBoolean("sync_on_launch", false)); swDoubleBack.setChecked(prefs.getBoolean("double_back", false)); - swConversationActions.setChecked(prefs.getBoolean("conversation_actions", false)); + swConversationActions.setChecked(prefs.getBoolean("conversation_actions", Helper.isGoogle())); swConversationActionsReplies.setChecked(prefs.getBoolean("conversation_actions_replies", true)); swConversationActionsReplies.setEnabled(swConversationActions.isChecked()); swLanguageDetection.setChecked(prefs.getBoolean("language_detection", false)); diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 6d27a50ad7..1a8ca03e30 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -963,6 +963,10 @@ public class Helper { return true; } + static boolean isGoogle() { + return "Google".equalsIgnoreCase(Build.MANUFACTURER); + } + static boolean isSamsung() { return "Samsung".equalsIgnoreCase(Build.MANUFACTURER); }