Notifications: Put actions inside onclick handler

This commit is contained in:
Scott Nonnenberg 2023-08-01 13:33:04 -07:00 committed by GitHub
parent 269cd9b51d
commit ae0aef52dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -199,6 +199,7 @@ class NotificationService extends EventEmitter {
tag: messageId,
});
notification.onclick = () => {
// Note: this maps to the xmlTemplate() function in app/WindowsNotifications.ts
if (
type === NotificationType.Message ||
@ -223,6 +224,8 @@ class NotificationService extends EventEmitter {
} else {
throw missingCaseError(type);
}
};
this.lastNotification = notification;
}