From 8b18958a972bea11b77ebcc0ebe11c90d3921a9f Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Wed, 23 Oct 2024 16:31:37 +0200 Subject: [PATCH] fix(app): do not show notification when download was canceled Signed-off-by: Grigorii K. Shartsev --- src/app/applyDownloadNotification.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/applyDownloadNotification.js b/src/app/applyDownloadNotification.js index 504d88ac..5b9cd477 100644 --- a/src/app/applyDownloadNotification.js +++ b/src/app/applyDownloadNotification.js @@ -26,14 +26,14 @@ export function applyDownloadNotification(browserWindow) { notification.on('click', () => { shell.showItemInFolder(pathToFile) }) - } else { + } else if (state === 'interrupted') { notification = new Notification({ title: 'Download Failed', body: `Something went wrong with the download of '${base}'.`, }) } - notification.show() + notification?.show() }) }) }