style(wallpaper): dont switch favorite in split wallpaper on first click

This commit is contained in:
Lysec
2026-03-30 14:40:39 +02:00
parent ea48cd0bbf
commit c879d0864b
+13 -1
View File
@@ -1431,7 +1431,7 @@ Singleton {
if (root.pendingFavoriteSchemeRefresh && root.pendingFavoriteSchemeRefresh.path === path && root.pendingFavoriteSchemeRefresh.slot === slot) {
root.pendingFavoriteSchemeRefresh = null;
}
} else {
} else if (Settings.data.wallpaper.linkLightAndDarkWallpapers) {
favorites[anyIdx] = _createFavoriteEntry(path, slot);
Logger.d("Wallpaper", "Moved favorite to other appearance:", path, slot);
root.scheduleFavoriteSchemeSnapshot(path, slot);
@@ -1442,6 +1442,18 @@ Singleton {
"slot": slot
};
}
} else {
// Separate light/dark wallpapers: star is remove-only (no sun/moon hint for "move" vs unfavorite).
favorites.splice(anyIdx, 1);
Logger.d("Wallpaper", "Removed favorite (star on other appearance tab, separate wallpapers):", path);
if (favoriteSchemeDebounceTimer.pendingPath === path) {
favoriteSchemeDebounceTimer.stop();
favoriteSchemeDebounceTimer.pendingPath = "";
favoriteSchemeDebounceTimer.pendingSlot = "";
}
if (root.pendingFavoriteSchemeRefresh && root.pendingFavoriteSchemeRefresh.path === path) {
root.pendingFavoriteSchemeRefresh = null;
}
}
} else {
favorites.push(_createFavoriteEntry(path, slot));