Fixed auto dark mode

This commit is contained in:
keplyx 2020-03-10 21:35:31 +01:00
parent ef37ed629f
commit f06d5c36e4

View file

@ -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');
}
/**