[themes] restore "Dark mode" state after relaunch
This commit is contained in:
parent
cccc76fbc5
commit
eec8783d5b
|
@ -321,6 +321,13 @@ define([
|
||||||
document.body.className = document.body.className.replace(/theme-[\w-]+\s?/gi, '').trim();
|
document.body.className = document.body.className.replace(/theme-[\w-]+\s?/gi, '').trim();
|
||||||
document.body.classList.add(id, 'theme-type-' + themes_map[id].type);
|
document.body.classList.add(id, 'theme-type-' + themes_map[id].type);
|
||||||
|
|
||||||
|
if ( themes_map[id].type == 'light' ) {
|
||||||
|
this.api.asc_setContentDarkMode(false);
|
||||||
|
} else {
|
||||||
|
this.api.asc_setContentDarkMode(this.isContentThemeDark());
|
||||||
|
Common.NotificationCenter.trigger('contenttheme:dark', this.isContentThemeDark());
|
||||||
|
}
|
||||||
|
|
||||||
if ( this.api ) {
|
if ( this.api ) {
|
||||||
var obj = get_current_theme_colors(name_colors);
|
var obj = get_current_theme_colors(name_colors);
|
||||||
obj.type = themes_map[id].type;
|
obj.type = themes_map[id].type;
|
||||||
|
|
Loading…
Reference in a new issue