From 0cc5bfd0d296f4396ec2f36e06564d77fe027b76 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Sat, 19 Sep 2020 15:20:52 +0200 Subject: [PATCH] Do no show the failed jobs in the notification if there if there isn't a failed one. --- Classes/QueueController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/QueueController.swift b/Classes/QueueController.swift index c2ec9f9..d377024 100644 --- a/Classes/QueueController.swift +++ b/Classes/QueueController.swift @@ -100,7 +100,7 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel let notification = NSUserNotification() notification.title = NSLocalizedString("Queue Done", comment: "") - if let failedCount = info["FailedCount"] as? UInt, + if let failedCount = info["FailedCount"] as? UInt, failedCount > 0, let completedCount = info["CompletedCount"] as? UInt { notification.informativeText = "Completed: \(completedCount); Failed: \(failedCount)" }