Add browser theme detection
This commit is contained in:
parent
efb773676c
commit
79d77f60df
|
@ -95,9 +95,15 @@ class ConfigStore extends ChangeNotifier {
|
||||||
};
|
};
|
||||||
|
|
||||||
_showAvatars = localUserSettings.showAvatars;
|
_showAvatars = localUserSettings.showAvatars;
|
||||||
_theme = darkModeLemmyUiThemes.contains(localUserSettings.theme)
|
_theme = () {
|
||||||
? ThemeMode.dark
|
if (localUserSettings.theme == 'browser') return ThemeMode.system;
|
||||||
: ThemeMode.light;
|
|
||||||
|
if (darkModeLemmyUiThemes.contains(localUserSettings.theme)) {
|
||||||
|
return ThemeMode.dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ThemeMode.light;
|
||||||
|
}();
|
||||||
_locale = L10n.supportedLocales.contains(Locale(localUserSettings.lang))
|
_locale = L10n.supportedLocales.contains(Locale(localUserSettings.lang))
|
||||||
? Locale(localUserSettings.lang)
|
? Locale(localUserSettings.lang)
|
||||||
: _locale;
|
: _locale;
|
||||||
|
|
Loading…
Reference in New Issue