[dark theme] stylesheets didn't apply on next app start

This commit is contained in:
Maxim Kadushkin 2021-02-18 00:25:27 +03:00
parent 64dfc35569
commit 842609d80c

View file

@ -27,7 +27,12 @@ define([
})
this.api = api;
api.asc_setSkin(sdk_themes_relation[Common.localStorage.getItem('ui-theme', 'theme-light')]);
var theme_name = Common.localStorage.getItem('ui-theme', 'theme-light');
api.asc_setSkin(sdk_themes_relation[theme_name]);
if ( !$('body').hasClass(theme_name) ) {
$('body').addClass(theme_name);
}
// app.eventbus.addListeners({
// 'FileMenu': {