Skip to content

Commit

Permalink
ts: services: Do not clear notification on update
Browse files Browse the repository at this point in the history
  • Loading branch information
bellegarde-c committed Dec 20, 2024
1 parent d7a94c2 commit 1af1e2b
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions ts/services/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,19 +311,6 @@ class NotificationService extends EventEmitter {
const isAppFocused = window.SignalContext.activeWindowService.isActive();
const userSetting = this.getNotificationSetting();

if (OS.isWindows()) {
// Note: notificationData will be set if we're replacing the previous notification
// with a new one, so we won't clear here. That's because we always clear before
// adding anythhing new; just one notification at a time. Electron forces it, so
// we replicate it with our Windows notifications.
if (!notificationData) {
drop(window.IPC.clearAllWindowsNotifications());
}
} else if (this.lastNotification) {
this.lastNotification.close();
this.lastNotification = null;
}

// This isn't a boolean because TypeScript isn't smart enough to know that, if
// `Boolean(notificationData)` is true, `notificationData` is truthy.
const shouldShowNotification =
Expand Down

0 comments on commit 1af1e2b

Please sign in to comment.