1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

settings: fix wallpaper preview cache update on per-mode change

This commit is contained in:
bbedward
2026-01-12 09:58:58 -05:00
parent 022b4b4bb3
commit d6b407ec37

View File

@@ -34,7 +34,10 @@ Image {
return;
}
Paths.mkdir(Paths.imagecache);
source = cachePath || encodedImagePath;
const hash = djb2Hash(imagePath);
const cPath = hash ? `${Paths.stringify(Paths.imagecache)}/${hash}@${maxCacheSize}x${maxCacheSize}.png` : "";
const encoded = "file://" + imagePath.split('/').map(s => encodeURIComponent(s)).join('/');
source = cPath || encoded;
}
onStatusChanged: {