don't overwrite notifications

re: sk22#219
This commit is contained in:
sk
2023-01-10 09:38:28 +01:00
parent cbcbaaa9fa
commit 2614118d7d
5 changed files with 13 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ public class GlobalUserPreferences{
public static boolean translateButtonOpenedOnly;
public static boolean uniformNotificationIcon;
public static boolean reduceMotion;
public static boolean keepOnlyLatestNotification;
public static String publishButtonText;
public static ThemePreference theme;
public static ColorPreference color;
@@ -64,6 +65,7 @@ public class GlobalUserPreferences{
translateButtonOpenedOnly=prefs.getBoolean("translateButtonOpenedOnly", false);
uniformNotificationIcon=prefs.getBoolean("uniformNotificationIcon", false);
reduceMotion=prefs.getBoolean("reduceMotion", false);
keepOnlyLatestNotification=prefs.getBoolean("keepOnlyLatestNotification", false);
publishButtonText=prefs.getString("publishButtonText", "");
theme=ThemePreference.values()[prefs.getInt("theme", 0)];
recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>());
@@ -93,6 +95,7 @@ public class GlobalUserPreferences{
.putBoolean("translateButtonOpenedOnly", translateButtonOpenedOnly)
.putBoolean("uniformNotificationIcon", uniformNotificationIcon)
.putBoolean("reduceMotion", reduceMotion)
.putBoolean("keepOnlyLatestNotification", keepOnlyLatestNotification)
.putString("publishButtonText", publishButtonText)
.putInt("theme", theme.ordinal())
.putString("color", color.name())