make toot button customizable

This commit is contained in:
sk
2022-12-21 16:07:47 +01:00
parent 8a9b59c66a
commit ab5648a5d6
5 changed files with 54 additions and 8 deletions

View File

@@ -27,6 +27,7 @@ public class GlobalUserPreferences{
public static boolean disableSwipe;
public static boolean voteButtonForSingleChoice;
public static boolean enableDeleteNotifications;
public static String publishButtonText;
public static ThemePreference theme;
public static ColorPreference color;
@@ -57,6 +58,7 @@ public class GlobalUserPreferences{
disableSwipe=prefs.getBoolean("disableSwipe", false);
voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true);
enableDeleteNotifications=prefs.getBoolean("enableDeleteNotifications", false);
publishButtonText=prefs.getString("publishButtonText", "");
theme=ThemePreference.values()[prefs.getInt("theme", 0)];
recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>());
@@ -82,6 +84,7 @@ public class GlobalUserPreferences{
.putBoolean("disableMarquee", disableMarquee)
.putBoolean("disableSwipe", disableSwipe)
.putBoolean("enableDeleteNotifications", enableDeleteNotifications)
.putString("publishButtonText", publishButtonText)
.putInt("theme", theme.ordinal())
.putString("color", color.name())
.putString("recentLanguages", gson.toJson(recentLanguages))