mirror of https://github.com/M66B/FairEmail.git
Reset hints
This commit is contained in:
parent
94031f889b
commit
2dcdc264b9
|
@ -53,6 +53,7 @@ import java.util.Map;
|
||||||
|
|
||||||
abstract class ActivityBase extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
|
abstract class ActivityBase extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
private Context originalContext;
|
private Context originalContext;
|
||||||
|
private boolean visible;
|
||||||
private boolean contacts;
|
private boolean contacts;
|
||||||
private List<IKeyPressedListener> keyPressedListeners = new ArrayList<>();
|
private List<IKeyPressedListener> keyPressedListeners = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -235,6 +236,8 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
Log.d("Resume " + this.getClass().getName());
|
Log.d("Resume " + this.getClass().getName());
|
||||||
|
|
||||||
|
visible = true;
|
||||||
|
|
||||||
boolean contacts = hasPermission(Manifest.permission.READ_CONTACTS);
|
boolean contacts = hasPermission(Manifest.permission.READ_CONTACTS);
|
||||||
if (!this.getClass().equals(ActivitySetup.class) && this.contacts != contacts) {
|
if (!this.getClass().equals(ActivitySetup.class) && this.contacts != contacts) {
|
||||||
Log.i("Contacts permission=" + contacts);
|
Log.i("Contacts permission=" + contacts);
|
||||||
|
@ -251,6 +254,8 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
||||||
Log.d("Pause " + this.getClass().getName());
|
Log.d("Pause " + this.getClass().getName());
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
|
||||||
|
visible = false;
|
||||||
|
|
||||||
if (!this.getClass().equals(ActivityMain.class) && Helper.shouldAuthenticate(this))
|
if (!this.getClass().equals(ActivityMain.class) && Helper.shouldAuthenticate(this))
|
||||||
finishAndRemoveTask();
|
finishAndRemoveTask();
|
||||||
}
|
}
|
||||||
|
@ -367,7 +372,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
||||||
finish();
|
finish();
|
||||||
if (this.getClass().equals(ActivitySetup.class))
|
if (this.getClass().equals(ActivitySetup.class))
|
||||||
startActivity(getIntent());
|
startActivity(getIntent());
|
||||||
} else if (!this.getClass().equals(ActivitySetup.class) &&
|
} else if (!this.getClass().equals(ActivitySetup.class) && !visible &&
|
||||||
Arrays.asList(FragmentOptions.OPTIONS_RESTART).contains(key))
|
Arrays.asList(FragmentOptions.OPTIONS_RESTART).contains(key))
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,15 +253,6 @@ public class ApplicationEx extends Application {
|
||||||
editor.putBoolean("highlight_unread", highlight_unread);
|
editor.putBoolean("highlight_unread", highlight_unread);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BuildConfig.DEBUG && false) {
|
|
||||||
editor.remove("app_support");
|
|
||||||
editor.remove("notify_archive");
|
|
||||||
editor.remove("message_swipe");
|
|
||||||
editor.remove("message_select");
|
|
||||||
editor.remove("folder_actions");
|
|
||||||
editor.remove("folder_sync");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (version < BuildConfig.VERSION_CODE)
|
if (version < BuildConfig.VERSION_CODE)
|
||||||
editor.putInt("previous_version", version);
|
editor.putInt("previous_version", version);
|
||||||
editor.putInt("version", BuildConfig.VERSION_CODE);
|
editor.putInt("version", BuildConfig.VERSION_CODE);
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class FragmentOptions extends FragmentBase {
|
||||||
private PagerAdapter adapter;
|
private PagerAdapter adapter;
|
||||||
|
|
||||||
static String[] OPTIONS_RESTART = new String[]{
|
static String[] OPTIONS_RESTART = new String[]{
|
||||||
|
"first", "app_support", "notify_archive", "message_swipe", "message_select", "folder_actions", "folder_sync",
|
||||||
"subscriptions",
|
"subscriptions",
|
||||||
"landscape", "landscape3", "startup", "cards", "indentation", "date", "threading", "highlight_unread", "color_stripe",
|
"landscape", "landscape3", "startup", "cards", "indentation", "date", "threading", "highlight_unread", "color_stripe",
|
||||||
"avatars", "gravatars", "generated_icons", "identicons", "circular", "saturation", "brightness", "threshold",
|
"avatars", "gravatars", "generated_icons", "identicons", "circular", "saturation", "brightness", "threshold",
|
||||||
|
|
|
@ -82,7 +82,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
};
|
};
|
||||||
|
|
||||||
private final static String[] RESET_QUESTIONS = new String[]{
|
private final static String[] RESET_QUESTIONS = new String[]{
|
||||||
"welcome", "crash_reports_asked", "review_asked", "review_later", "why",
|
"welcome", "first", "app_support", "notify_archive", "message_swipe", "message_select", "folder_actions", "folder_sync",
|
||||||
|
"crash_reports_asked", "review_asked", "review_later", "why",
|
||||||
"reply_hint", "html_always_images", "print_html_confirmed", "move_1_confirmed", "move_n_confirmed",
|
"reply_hint", "html_always_images", "print_html_confirmed", "move_1_confirmed", "move_n_confirmed",
|
||||||
"identities_asked", "cc_bcc", "inline_image_hint", "compose_reference", "send_dialog",
|
"identities_asked", "cc_bcc", "inline_image_hint", "compose_reference", "send_dialog",
|
||||||
"setup_advanced"
|
"setup_advanced"
|
||||||
|
|
Loading…
Reference in New Issue