Merge branch 'merge/load-more-direction'
This commit is contained in:
@@ -25,6 +25,8 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import androidx.annotation.StringRes;
|
||||
|
||||
public class GlobalUserPreferences{
|
||||
private static final String TAG="GlobalUserPreferences";
|
||||
|
||||
@@ -32,6 +34,7 @@ public class GlobalUserPreferences{
|
||||
public static boolean useCustomTabs;
|
||||
public static boolean altTextReminders, confirmUnfollow, confirmBoost, confirmDeletePost;
|
||||
public static ThemePreference theme;
|
||||
public static LoadMissingPostsPreference loadMissingPosts;
|
||||
|
||||
// MEGALODON
|
||||
public static boolean trueBlackTheme;
|
||||
@@ -121,6 +124,7 @@ public class GlobalUserPreferences{
|
||||
displayPronounsInUserListings=prefs.getBoolean("displayPronounsInUserListings", true);
|
||||
overlayMedia=prefs.getBoolean("overlayMedia", false);
|
||||
showSuicideHelp=prefs.getBoolean("showSuicideHelp", true);
|
||||
loadMissingPosts=LoadMissingPostsPreference.values()[prefs.getInt("loadMissingItems", 0)];
|
||||
|
||||
if (prefs.contains("prefixRepliesWithRe")) {
|
||||
prefixReplies = prefs.getBoolean("prefixRepliesWithRe", false)
|
||||
@@ -180,6 +184,7 @@ public class GlobalUserPreferences{
|
||||
.putBoolean("displayPronounsInUserListings", displayPronounsInUserListings)
|
||||
.putBoolean("overlayMedia", overlayMedia)
|
||||
.putBoolean("showSuicideHelp", showSuicideHelp)
|
||||
.putInt("loadMissingItems", loadMissingPosts.ordinal())
|
||||
.apply();
|
||||
}
|
||||
|
||||
@@ -274,4 +279,16 @@ public class GlobalUserPreferences{
|
||||
ALWAYS,
|
||||
TO_OTHERS
|
||||
}
|
||||
|
||||
public enum LoadMissingPostsPreference{
|
||||
NEWEST_FIRST(R.string.sk_load_missing_posts_newest_first), // Downwards, default
|
||||
OLDEST_FIRST(R.string.sk_load_missing_posts_oldest_first); // Upwards
|
||||
|
||||
@StringRes
|
||||
public int labelRes;
|
||||
|
||||
LoadMissingPostsPreference(@StringRes int labelRes){
|
||||
this.labelRes=labelRes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user