forked from vergnet/application-amicale
Fixed auto dark mode
This commit is contained in:
parent
ef37ed629f
commit
f06d5c36e4
1 changed files with 6 additions and 4 deletions
|
@ -112,8 +112,10 @@ export default class ThemeManager {
|
|||
* @returns {boolean} Night mode state
|
||||
*/
|
||||
static getNightMode(): boolean {
|
||||
return AsyncStorageManager.getInstance().preferences.nightMode.current === '1' ||
|
||||
AsyncStorageManager.getInstance().preferences.nightModeFollowSystem.current === '1' && colorScheme === 'dark';
|
||||
return (AsyncStorageManager.getInstance().preferences.nightMode.current === '1' &&
|
||||
(AsyncStorageManager.getInstance().preferences.nightModeFollowSystem.current !== '1' ||
|
||||
colorScheme === 'no-preference')) ||
|
||||
(AsyncStorageManager.getInstance().preferences.nightModeFollowSystem.current === '1' && colorScheme === 'dark');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue