From 84054cec23d5b95a361822ad74bd98dbac96c44b Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 4 Jun 2023 08:26:06 +0200 Subject: [PATCH] Upgrade filter settings --- app/src/main/java/eu/faircode/email/ApplicationEx.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/ApplicationEx.java b/app/src/main/java/eu/faircode/email/ApplicationEx.java index 4cb62c6423..512cea1cb8 100644 --- a/app/src/main/java/eu/faircode/email/ApplicationEx.java +++ b/app/src/main/java/eu/faircode/email/ApplicationEx.java @@ -712,6 +712,14 @@ public class ApplicationEx extends Application .putBoolean("swipe_sensitivity_updated", true); } } + } else if (version < 2075) { + for (String name : new String[]{"seen", "unflagged", "unknown", "snoozed", "deleted"}) + if (prefs.contains("filter_" + name)) + for (String _type : new String[]{EntityFolder.ARCHIVE, EntityFolder.TRASH, EntityFolder.JUNK}) { + String type = _type.toLowerCase(Locale.ROOT); + if (!prefs.contains("filter_" + type + "_" + name)) + editor.putBoolean("filter_" + type + "_" + name, prefs.getBoolean("filter_" + name, false)); + } } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)