File tree Expand file tree Collapse file tree
app/src/main/java/com/orgzly/android/prefs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -773,9 +773,19 @@ public static boolean keepScreenOnMenuItem(Context context) {
773773 */
774774
775775 public static String widgetColorScheme (Context context ) {
776- return getDefaultSharedPreferences (context ).getString (
776+ String scheme = getDefaultSharedPreferences (context ).getString (
777777 context .getResources ().getString (R .string .pref_key_widget_color_scheme ),
778778 context .getResources ().getString (R .string .pref_default_widget_color_scheme ));
779+
780+ // FIXME: Return scheme found in preferences if it's supported, or the first one if not.
781+ String [] schemes = context .getResources ().getStringArray (R .array .widget_color_scheme_values );
782+ for (String s : schemes ) {
783+ if (s .equals (scheme )) {
784+ return scheme ;
785+ }
786+ }
787+
788+ return schemes [0 ];
779789 }
780790
781791 public static int widgetOpacity (Context context ) {
You can’t perform that action at this time.
0 commit comments