From 052bdefaab87e2a8d49325b7545ae2453b8c18b6 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Sun, 21 Sep 2025 12:28:42 -0400 Subject: [PATCH] Notification: finalization before merge --- Services/NotificationService.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Services/NotificationService.qml b/Services/NotificationService.qml index f92d3b8d..be537f22 100644 --- a/Services/NotificationService.qml +++ b/Services/NotificationService.qml @@ -48,6 +48,7 @@ Singleton { const req = imageQueue[0] if (status === Image.Ready) { + Logger.log("Notification", "Caching image to:", req.dest) Quickshell.execDetached(["mkdir", "-p", Settings.cacheDirImagesNotifications]) grabToImage(result => { if (result.saveToFile(req.dest)) @@ -144,6 +145,8 @@ Singleton { "dest": dest, "imageId": imageId }) + + // If we have a single item in the queue, process it immediately if (imageQueue.length === 1) cacher.source = path } @@ -157,6 +160,7 @@ Singleton { function updateModel(model, id, prop, value) { for (var i = 0; i < model.count; i++) { if (model.get(i).id === id) { + model.setProperty(i, prop, "") model.setProperty(i, prop, value) break } @@ -313,12 +317,10 @@ Singleton { if (image.startsWith("image://qsimage/")) { // Try to use app name + summary for uniqueness (summary often contains username) const key = (notification.appName || "") + "|" + (notification.summary || "") - const hash = Checksum.sha256(key) - return hash + return Checksum.sha256(key) } - const hash = Checksum.sha256(image) - return hash + return Checksum.sha256(image) } return "" }