Fixing color preference not saved loaded on android 11 and below devices

This commit is contained in:
LucasGGamerM 2022-12-23 12:39:14 -03:00
parent 584f28534a
commit b53ada7ea2
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ public class GlobalUserPreferences{
if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.S){
color=ColorPreference.valueOf(prefs.getString("color", ColorPreference.MATERIAL3.name()));
}else{
color=ColorPreference.PURPLE;
color=ColorPreference.valueOf(prefs.getString("color", ColorPreference.PURPLE.name()));
}
} catch (IllegalArgumentException|ClassCastException ignored) {
// invalid color name or color was previously saved as integer