Notifications: Put actions inside onclick handler
This commit is contained in:
@@ -199,30 +199,33 @@ class NotificationService extends EventEmitter {
|
|||||||
tag: messageId,
|
tag: messageId,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Note: this maps to the xmlTemplate() function in app/WindowsNotifications.ts
|
notification.onclick = () => {
|
||||||
if (
|
// Note: this maps to the xmlTemplate() function in app/WindowsNotifications.ts
|
||||||
type === NotificationType.Message ||
|
if (
|
||||||
type === NotificationType.Reaction
|
type === NotificationType.Message ||
|
||||||
) {
|
type === NotificationType.Reaction
|
||||||
window.IPC.showWindow();
|
) {
|
||||||
window.Events.showConversationViaNotification({
|
window.IPC.showWindow();
|
||||||
conversationId,
|
window.Events.showConversationViaNotification({
|
||||||
messageId,
|
conversationId,
|
||||||
storyId,
|
messageId,
|
||||||
});
|
storyId,
|
||||||
} else if (type === NotificationType.IncomingGroupCall) {
|
});
|
||||||
window.IPC.showWindow();
|
} else if (type === NotificationType.IncomingGroupCall) {
|
||||||
window.reduxActions?.calling?.startCallingLobby({
|
window.IPC.showWindow();
|
||||||
conversationId,
|
window.reduxActions?.calling?.startCallingLobby({
|
||||||
isVideoCall: true,
|
conversationId,
|
||||||
});
|
isVideoCall: true,
|
||||||
} else if (type === NotificationType.IsPresenting) {
|
});
|
||||||
window.reduxActions?.calling?.setPresenting();
|
} else if (type === NotificationType.IsPresenting) {
|
||||||
} else if (type === NotificationType.IncomingCall) {
|
window.reduxActions?.calling?.setPresenting();
|
||||||
window.IPC.showWindow();
|
} else if (type === NotificationType.IncomingCall) {
|
||||||
} else {
|
window.IPC.showWindow();
|
||||||
throw missingCaseError(type);
|
} else {
|
||||||
}
|
throw missingCaseError(type);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
this.lastNotification = notification;
|
this.lastNotification = notification;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user