mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 15:02:04 +00:00
fix(notifications): show the mood reminder's real default in the matrix
The /notifications matrix read the constant default table, where the mood reminder is off, while delivery derives it from the reminder card. An account receiving the reminder saw every one of its channel switches off. The no-row default now lives in one resolver that delivery and the preferences read both use. GET /api/notifications/preferences publishes it as `eventDefaults`, the matrix renders a switch without a stored row from that map, and the reminder card refreshes the matrix when it flips.
This commit is contained in:
1 parent
421aacf457
commit
dc704b5e63
10 files changed
+487
-27
No files matched your search
@@ -112,9 +112,16 @@ export function MoodReminderCard({
|
||||
: t("notifications.moodReminder.disabledToast"),
|
||||
);
|
||||
setMsgType("success");
|
||||
await queryClient.invalidateQueries({
|
||||
queryKey: queryKeys.userProfile(),
|
||||
});
|
||||
await Promise.all([
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: queryKeys.userProfile(),
|
||||
}),
|
||||
// The /notifications matrix shows the reminder's channel switches
|
||||
// from the server's `eventDefaults`, which follow this card.
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: queryKeys.notificationsPreferences(),
|
||||
}),
|
||||
]);
|
||||
setOptimistic(null);
|
||||
scheduleClear();
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user