refactor: move LatestNotificationID preference away from GlobalUserPreferences

This is solely for the purpose of organization, as I think GlobalUserPreferences should only directly contain Global user preferences
This commit is contained in:
LucasGGamerM
2023-04-10 15:12:23 -03:00
parent 0a1c42f90b
commit d6d6155f2c
2 changed files with 6 additions and 6 deletions

View File

@@ -52,7 +52,6 @@ public class GlobalUserPreferences{
public static boolean compactReblogReplyLine;
public static boolean replyLineAboveHeader;
public static boolean swapBookmarkWithBoostAction;
public static int latestNotificationId = 0;
public static String publishButtonText;
public static ThemePreference theme;
public static ColorPreference color;
@@ -73,7 +72,7 @@ public class GlobalUserPreferences{
public static String replyVisibility;
private static SharedPreferences getPrefs(){
public static SharedPreferences getPrefs(){
return MastodonApp.context.getSharedPreferences("global", Context.MODE_PRIVATE);
}
@@ -127,7 +126,6 @@ public class GlobalUserPreferences{
accountsWithLocalOnlySupport=prefs.getStringSet("accountsWithLocalOnlySupport", new HashSet<>());
accountsInGlitchMode=prefs.getStringSet("accountsInGlitchMode", new HashSet<>());
replyVisibility=prefs.getString("replyVisibility", null);
latestNotificationId=prefs.getInt("latestNotificationId", 0);
try {
if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.S){
@@ -184,7 +182,6 @@ public class GlobalUserPreferences{
.putStringSet("accountsWithLocalOnlySupport", accountsWithLocalOnlySupport)
.putStringSet("accountsInGlitchMode", accountsInGlitchMode)
.putString("replyVisibility", replyVisibility)
.putInt("latestNotificationId", latestNotificationId)
.apply();
}