Wallpaper: flush nextWallpaper.source when no longer needed in a attempt to save ram

This commit is contained in:
LemmyCook 2025-08-29 21:52:16 -04:00
parent da266792df
commit 6af915983c

View file

@ -180,6 +180,7 @@ Variants {
onFinished: { onFinished: {
// Swap images after transition completes // Swap images after transition completes
currentWallpaper.source = nextWallpaper.source currentWallpaper.source = nextWallpaper.source
nextWallpaper.source = ""
transitionProgress = 0.0 transitionProgress = 0.0
transitioning = false transitioning = false
} }
@ -194,7 +195,7 @@ Variants {
function setWallpaperImmediate(source) { function setWallpaperImmediate(source) {
currentWallpaper.source = source currentWallpaper.source = source
nextWallpaper.source = source nextWallpaper.source = ""
transitionProgress = 0.0 transitionProgress = 0.0
transitioning = false transitioning = false
} }
@ -204,8 +205,9 @@ Variants {
if (transitioning) { if (transitioning) {
// We are interrupting a transition // We are interrupting a transition
currentWallpaper.source = nextWallpaper.source
transitionAnimation.stop() transitionAnimation.stop()
currentWallpaper.source = nextWallpaper.source
nextWallpaper.source = ""
transitionProgress = 0 transitionProgress = 0
transitioning = false transitioning = false
} }