mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
fix syncWallpaperForCurrentMode
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user