Skip to content

Commit

Permalink
Fixed issue with notifications not going away sometimes
Browse files Browse the repository at this point in the history
Former-commit-id: 88a4b68
  • Loading branch information
joaomgcd committed Jul 30, 2020
1 parent 98bf8c0 commit ca532ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion server/servernotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
4 changes: 3 additions & 1 deletion v2/gcm/gcmbase.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12 3V13.55C11.41 13.21 10.73 13 10 13C7.79 13 6 14.79 6 17S7.79 21 10 21 14 19.21 14 17V7H18V3H12Z" /></svg>`);
notification.actions = [
// GCMMediaInfo.notificationActionBack,
Expand Down

0 comments on commit ca532ac

Please sign in to comment.