1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-03 20:32:07 -04:00

fix syncWallpaperForCurrentMode

This commit is contained in:
bbedward
2026-03-27 09:35:39 -04:00
parent 5ee93a67fe
commit 521a3fa6e8

View File

@@ -345,8 +345,8 @@ Singleton {
function setLightMode(lightMode) {
isSwitchingMode = true;
syncWallpaperForCurrentMode(lightMode);
isLightMode = lightMode;
syncWallpaperForCurrentMode();
saveSettings();
Qt.callLater(() => {
isSwitchingMode = false;
@@ -1112,15 +1112,16 @@ Singleton {
saveSettings();
}
function syncWallpaperForCurrentMode() {
function syncWallpaperForCurrentMode(mode) {
if (!perModeWallpaper)
return;
var light = (mode !== undefined) ? mode : isLightMode;
if (perMonitorWallpaper) {
monitorWallpapers = isLightMode ? Object.assign({}, monitorWallpapersLight) : Object.assign({}, monitorWallpapersDark);
monitorWallpapers = light ? Object.assign({}, monitorWallpapersLight) : Object.assign({}, monitorWallpapersDark);
return;
}
wallpaperPath = isLightMode ? wallpaperPathLight : wallpaperPathDark;
wallpaperPath = light ? wallpaperPathLight : wallpaperPathDark;
}
function _findMonitorValue(map, screenName) {