From ca532ac8b4b8954b10ee49a992a25f123a243d5a Mon Sep 17 00:00:00 2001 From: joaomgcd Date: Thu, 30 Jul 2020 16:38:59 +0100 Subject: [PATCH] Fixed issue with notifications not going away sometimes Former-commit-id: 88a4b68df31c43cf94c0133e759512a181c83203 --- server/servernotification.js | 3 ++- v2/gcm/gcmbase.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/servernotification.js b/server/servernotification.js index a8f1059..e8b29c9 100644 --- a/server/servernotification.js +++ b/server/servernotification.js @@ -33,7 +33,8 @@ class WindowNotifications extends Array{ async createWindowIfNeeded(){ if(this.window) return; - + + this.isUserInteracting = false; let notificationWidth = 0; let notificationHeight = 0; if(debugging){ diff --git a/v2/gcm/gcmbase.js b/v2/gcm/gcmbase.js index 8d73e7e..b76732a 100644 --- a/v2/gcm/gcmbase.js +++ b/v2/gcm/gcmbase.js @@ -287,7 +287,9 @@ class GCMMediaInfoBase{ notification.id = gcm.packageName + gcm.senderId; notification.title = `Media ${gcm.playing ? "playing" : "stopped"}${device ? " on " + device.deviceName : ""}` notification.body = `${gcm.track} by ${gcm.artist}` - notification.icon = gcm.art.startsWith("http") ? `${gcm.art}?token=${gcm.authToken}` : Util.getBase64ImageUrl(gcm.art); + if(gcm.art){ + notification.icon = gcm.art.startsWith("http") ? `${gcm.art}?token=${gcm.authToken}` : Util.getBase64ImageUrl(gcm.art); + } notification.badge = Util.getBase64SvgUrl(``); notification.actions = [ // GCMMediaInfo.notificationActionBack,