Upgrade filter settings

This commit is contained in:
M66B 2023-06-04 08:26:06 +02:00
parent 2f31ceadaa
commit 84054cec23
1 changed files with 8 additions and 0 deletions

View File

@ -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)