[mobile] extended theme switching

This commit is contained in:
Maxim Kadushkin 2022-07-13 17:17:05 +03:00
parent 8099221efb
commit c6026fca56

View file

@ -26,6 +26,14 @@ class ThemesController {
}
this.switchDarkTheme(theme, true);
$$(window).on('storage', e => {
if ( e.key == LocalStorage.prefix + 'ui-theme' ) {
if ( !!e.newValue ) {
this.switchDarkTheme(JSON.parse(e.newValue), true);
}
}
});
}
get isCurrentDark() {