From b53ada7ea2f6b2c204b7685b059628355ac361d8 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Fri, 23 Dec 2022 12:39:14 -0300 Subject: [PATCH] Fixing color preference not saved loaded on android 11 and below devices --- .../java/org/joinmastodon/android/GlobalUserPreferences.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java b/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java index 0d329f130..7bbe675e1 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java +++ b/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java @@ -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