mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 15:11:03 +00:00
Enabled conversation actions by default on Google devices only
This commit is contained in:
parent
dc163ff447
commit
4ab16ce1a3
4 changed files with 8 additions and 6 deletions
|
@ -2764,7 +2764,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
@RequiresApi(api = Build.VERSION_CODES.Q)
|
||||||
private ConversationActions getConversationActions(TupleMessageEx message, Document document, Context context) {
|
private ConversationActions getConversationActions(TupleMessageEx message, Document document, Context context) {
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
boolean conversation_actions = prefs.getBoolean("conversation_actions", false);
|
boolean conversation_actions = prefs.getBoolean("conversation_actions", Helper.isGoogle());
|
||||||
boolean conversation_actions_replies = prefs.getBoolean("conversation_actions_replies", true);
|
boolean conversation_actions_replies = prefs.getBoolean("conversation_actions_replies", true);
|
||||||
if (!conversation_actions)
|
if (!conversation_actions)
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -541,10 +541,8 @@ public class ApplicationEx extends Application
|
||||||
editor.putBoolean("discard_delete", false);
|
editor.putBoolean("discard_delete", false);
|
||||||
} else if (version < 1753)
|
} else if (version < 1753)
|
||||||
repairFolders(context);
|
repairFolders(context);
|
||||||
else if (version < 1771) {
|
else if (version < 1772)
|
||||||
if (!prefs.contains("conversation_actions"))
|
editor.remove("conversation_actions");
|
||||||
editor.putBoolean("conversation_actions", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)
|
||||||
editor.remove("background_service");
|
editor.remove("background_service");
|
||||||
|
|
|
@ -495,7 +495,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
||||||
|
|
||||||
swSyncOnlaunch.setChecked(prefs.getBoolean("sync_on_launch", false));
|
swSyncOnlaunch.setChecked(prefs.getBoolean("sync_on_launch", false));
|
||||||
swDoubleBack.setChecked(prefs.getBoolean("double_back", 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.setChecked(prefs.getBoolean("conversation_actions_replies", true));
|
||||||
swConversationActionsReplies.setEnabled(swConversationActions.isChecked());
|
swConversationActionsReplies.setEnabled(swConversationActions.isChecked());
|
||||||
swLanguageDetection.setChecked(prefs.getBoolean("language_detection", false));
|
swLanguageDetection.setChecked(prefs.getBoolean("language_detection", false));
|
||||||
|
|
|
@ -963,6 +963,10 @@ public class Helper {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static boolean isGoogle() {
|
||||||
|
return "Google".equalsIgnoreCase(Build.MANUFACTURER);
|
||||||
|
}
|
||||||
|
|
||||||
static boolean isSamsung() {
|
static boolean isSamsung() {
|
||||||
return "Samsung".equalsIgnoreCase(Build.MANUFACTURER);
|
return "Samsung".equalsIgnoreCase(Build.MANUFACTURER);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue