mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-18 07:53:07 +00:00
default to auto day/night on api29+
This commit is contained in:
parent
64fa453ea1
commit
f37420c4a8
4 changed files with 9 additions and 1 deletions
|
@ -574,7 +574,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
|||
public static Colors getColorsForCurrentTheme(final Context context, final SharedPreferences prefs) {
|
||||
// todo: night mode can be unspecified -> maybe need to adjust for correct behavior on some devices?
|
||||
final boolean isNight = (context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
|
||||
final String themeColors = (isNight && prefs.getBoolean(Settings.PREF_THEME_DAY_NIGHT, false))
|
||||
final String themeColors = (isNight && prefs.getBoolean(Settings.PREF_THEME_DAY_NIGHT, context.getResources().getBoolean(R.bool.day_night_default)))
|
||||
? prefs.getString(Settings.PREF_THEME_VARIANT_NIGHT, KeyboardTheme.THEME_DARKER)
|
||||
: prefs.getString(Settings.PREF_THEME_VARIANT, KeyboardTheme.THEME_LIGHT);
|
||||
final String themeStyle = prefs.getString(Settings.PREF_THEME_STYLE, KeyboardTheme.THEME_STYLE_MATERIAL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue