1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-05 21:18:30 -04:00

launcher: improve clipboard preview performance

related #2769
This commit is contained in:
bbedward
2026-07-06 18:15:49 -04:00
parent 6f298d3f52
commit 8a1acb63c9
5 changed files with 40 additions and 16 deletions
@@ -41,13 +41,18 @@ Rectangle {
}
function reloadPreview() {
cachedImageData = "";
cachedMimeType = "";
if (!canLoadImage || !entry?.id) {
_requestedEntryId = null;
cachedImageData = "";
cachedMimeType = "";
return;
}
// Entry objects are rebuilt per search; same id means same content
if (entry.id === _requestedEntryId)
return;
cachedImageData = "";
cachedMimeType = "";
const entryId = entry.id;
_requestedEntryId = entryId;
DMSService.sendRequest("clipboard.getEntry", {
@@ -78,6 +83,8 @@ Rectangle {
asynchronous: true
cache: false
smooth: true
sourceSize.width: 128
sourceSize.height: 128
fillMode: Image.PreserveAspectCrop
visible: status === Image.Ready
}