add option to disable automatically loading new posts

This commit is contained in:
sk
2022-11-09 10:30:25 +01:00
parent ae50e618c0
commit 4ede842171
6 changed files with 14 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ public class GlobalUserPreferences{
public static boolean playGifs;
public static boolean useCustomTabs;
public static boolean trueBlackTheme;
public static boolean loadNewPosts;
public static ThemePreference theme;
private static SharedPreferences getPrefs(){
@@ -18,6 +19,7 @@ public class GlobalUserPreferences{
playGifs=prefs.getBoolean("playGifs", true);
useCustomTabs=prefs.getBoolean("useCustomTabs", true);
trueBlackTheme=prefs.getBoolean("trueBlackTheme", false);
loadNewPosts=prefs.getBoolean("loadNewPosts", true);
theme=ThemePreference.values()[prefs.getInt("theme", 0)];
}
@@ -25,6 +27,7 @@ public class GlobalUserPreferences{
getPrefs().edit()
.putBoolean("playGifs", playGifs)
.putBoolean("useCustomTabs", useCustomTabs)
.putBoolean("loadNewPosts", loadNewPosts)
.putBoolean("trueBlackTheme", trueBlackTheme)
.putInt("theme", theme.ordinal())
.apply();