fix(darkmode): Fix toggling darkmode in notebookbar

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Change-Id: Ia8b490de6144df771e5ee115c068b87e997e3ccb
This commit is contained in:
Julius Härtl 2023-05-30 12:54:10 +02:00 committed by Szymon Kłos
parent 46a44c743a
commit 24446e274c

View file

@ -106,14 +106,14 @@ L.Control.UIManager = L.Control.extend({
}; };
app.socket.sendMessage('uno .uno:ChangeTheme ' + JSON.stringify(cmd)); app.socket.sendMessage('uno .uno:ChangeTheme ' + JSON.stringify(cmd));
} }
if (this.getSavedStateOrDefault('CompactMode', null)) { if (this.getCurrentMode() === 'classic') {
this.refreshMenubar(); this.refreshMenubar();
this.refreshToolbar();
} }
else { else {
this.refreshNotebookbar(); this.refreshNotebookbar();
} }
this.refreshSidebar(); this.refreshSidebar();
this.refreshToolbar();
}, },
initDarkModeFromSettings: function() { initDarkModeFromSettings: function() {
var selectedMode = this.getDarkModeState(); var selectedMode = this.getDarkModeState();