Added option to always show images

This commit is contained in:
M66B
2019-07-22 12:31:30 +02:00
parent b316486119
commit 45ddabc9f0
7 changed files with 59 additions and 19 deletions

View File

@@ -260,32 +260,37 @@ public class ApplicationEx extends Application {
static void upgrade(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = prefs.edit();
int version = prefs.getInt("version", BuildConfig.VERSION_CODE);
if (version < 468) {
Log.i("Upgrading from " + version + " to " + BuildConfig.VERSION_CODE);
SharedPreferences.Editor editor = prefs.edit();
editor.remove("notify_trash");
editor.remove("notify_archive");
editor.remove("notify_reply");
editor.remove("notify_flag");
editor.remove("notify_seen");
editor.putInt("version", BuildConfig.VERSION_CODE);
editor.apply();
} else if (version < 601) {
Log.i("Upgrading from " + version + " to " + BuildConfig.VERSION_CODE);
editor.putBoolean("contact_images", prefs.getBoolean("autoimages", true));
editor.remove("autoimages");
}
if (BuildConfig.DEBUG && false) {
SharedPreferences.Editor editor = prefs.edit();
editor.remove("app_support");
editor.remove("notify_archive");
editor.remove("message_swipe");
editor.remove("message_select");
editor.remove("folder_actions");
editor.remove("folder_sync");
editor.apply();
}
editor.putInt("version", BuildConfig.VERSION_CODE);
editor.apply();
}
static Context getLocalizedContext(Context context) {