Skip to content

Commit

Permalink
fix(notification): ignore duplicate notifications from devices
Browse files Browse the repository at this point in the history
Ignore notifications from devices when the ID, title and body all match,
to account for `GNotification` lacking a seamless updated like
freedeskop.org Notifications.
  • Loading branch information
andyholmes committed Sep 1, 2024
1 parent f11b94a commit 978d650
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,12 @@ class _Source {
this._notificationPending = true;

// valent-modifications-begin
const current = this._notifications[notification.id];
if (current?.deviceId && current.title === notification.title
&& current.body === notification.body) {
this._notificationPending = false;
return;
}
this._valentBindNotification(notification);
// valent-modifications-end

Expand Down

0 comments on commit 978d650

Please sign in to comment.