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

View File

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