add option to disable swiping

closes sk22#165
This commit is contained in:
sk
2022-12-19 11:31:38 -03:00
committed by LucasGGamerM
parent e4e9516d5d
commit d0d1d15de5
7 changed files with 78 additions and 62 deletions

View File

@@ -25,6 +25,7 @@ public class GlobalUserPreferences{
public static boolean showInteractionCounts;
public static boolean alwaysExpandContentWarnings;
public static boolean disableMarquee;
public static boolean disableSwipe;
public static boolean voteButtonForSingleChoice;
public static ThemePreference theme;
public static ColorPreference color;
@@ -54,6 +55,7 @@ public class GlobalUserPreferences{
showInteractionCounts=prefs.getBoolean("showInteractionCounts", false);
alwaysExpandContentWarnings=prefs.getBoolean("alwaysExpandContentWarnings", false);
disableMarquee=prefs.getBoolean("disableMarquee", false);
disableSwipe=prefs.getBoolean("disableSwipe", false);
voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true);
theme=ThemePreference.values()[prefs.getInt("theme", 0)];
recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>());
@@ -77,6 +79,7 @@ public class GlobalUserPreferences{
.putBoolean("showInteractionCounts", showInteractionCounts)
.putBoolean("alwaysExpandContentWarnings", alwaysExpandContentWarnings)
.putBoolean("disableMarquee", disableMarquee)
.putBoolean("disableSwipe", disableSwipe)
.putInt("theme", theme.ordinal())
.putString("recentLanguages", gson.toJson(recentLanguages))
.putInt("color", color.ordinal())