mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 16:02:51 -05:00
settings: fix wallpaper preview cache update on per-mode change
This commit is contained in:
@@ -34,7 +34,10 @@ Image {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Paths.mkdir(Paths.imagecache);
|
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: {
|
onStatusChanged: {
|
||||||
|
|||||||
Reference in New Issue
Block a user