mirror of https://github.com/M66B/FairEmail.git
Disable double back by default
This commit is contained in:
parent
9dfa47452c
commit
20030f9ff3
|
@ -690,7 +690,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
else if (!backHandled()) {
|
else if (!backHandled()) {
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ActivityView.this);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ActivityView.this);
|
||||||
boolean double_back = prefs.getBoolean("double_back", true);
|
boolean double_back = prefs.getBoolean("double_back", false);
|
||||||
if (searching || !double_back)
|
if (searching || !double_back)
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -461,6 +461,9 @@ public class ApplicationEx extends Application
|
||||||
} else if (version < 1535) {
|
} else if (version < 1535) {
|
||||||
editor.remove("identities_asked");
|
editor.remove("identities_asked");
|
||||||
editor.remove("identities_primary_hint");
|
editor.remove("identities_primary_hint");
|
||||||
|
} else if (version < 1539) {
|
||||||
|
if (!prefs.contains("double_back"))
|
||||||
|
editor.putBoolean("double_back", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)
|
||||||
|
|
|
@ -436,7 +436,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||||
|
|
||||||
swSyncOnlaunch.setChecked(prefs.getBoolean("sync_on_launch", false));
|
swSyncOnlaunch.setChecked(prefs.getBoolean("sync_on_launch", false));
|
||||||
swDoubleBack.setChecked(prefs.getBoolean("double_back", true));
|
swDoubleBack.setChecked(prefs.getBoolean("double_back", false));
|
||||||
swConversationActions.setChecked(prefs.getBoolean("conversation_actions", true));
|
swConversationActions.setChecked(prefs.getBoolean("conversation_actions", true));
|
||||||
swConversationActionsReplies.setChecked(prefs.getBoolean("conversation_actions_replies", true));
|
swConversationActionsReplies.setChecked(prefs.getBoolean("conversation_actions_replies", true));
|
||||||
swConversationActionsReplies.setEnabled(swConversationActions.isChecked());
|
swConversationActionsReplies.setEnabled(swConversationActions.isChecked());
|
||||||
|
|
Loading…
Reference in New Issue