diff --git a/apps/desktop/src/components/settings/views/notifications.tsx b/apps/desktop/src/components/settings/views/notifications.tsx index 8b5ed1107..7e65ba6e9 100644 --- a/apps/desktop/src/components/settings/views/notifications.tsx +++ b/apps/desktop/src/components/settings/views/notifications.tsx @@ -39,19 +39,19 @@ export default function NotificationsComponent() { mutationFn: async (v: Schema) => { if (v.event) { notificationCommands.requestNotificationPermission().then(() => { - notificationCommands.setDetectNotification(true); + notificationCommands.setEventNotification(true); }); } else { - notificationCommands.setDetectNotification(false); + notificationCommands.setEventNotification(false); } - return v.detect; + return v.event; }, onSuccess: (active) => { - detectNotification.refetch(); + eventNotification.refetch(); if (active) { - notificationCommands.startDetectNotification(); + notificationCommands.startEventNotification(); } else { - notificationCommands.stopDetectNotification(); + notificationCommands.stopEventNotification(); } }, }); @@ -60,19 +60,19 @@ export default function NotificationsComponent() { mutationFn: async (v: Schema) => { if (v.detect) { notificationCommands.requestNotificationPermission().then(() => { - notificationCommands.setEventNotification(true); + notificationCommands.setDetectNotification(true); }); } else { - notificationCommands.setEventNotification(false); + notificationCommands.setDetectNotification(false); } - return v.event; + return v.detect; }, onSuccess: (active) => { - eventNotification.refetch(); + detectNotification.refetch(); if (active) { - notificationCommands.startEventNotification(); + notificationCommands.startDetectNotification(); } else { - notificationCommands.stopEventNotification(); + notificationCommands.stopDetectNotification(); } }, });