From 8ea372083169100a04f3360def89961f812e02cb Mon Sep 17 00:00:00 2001 From: mARTin Date: Wed, 4 Mar 2026 11:14:46 +0100 Subject: [PATCH] fix: per-device settings save to cookie only, not DB --- src/components/WeeklyView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/WeeklyView.tsx b/src/components/WeeklyView.tsx index 9da2956..8709580 100644 --- a/src/components/WeeklyView.tsx +++ b/src/components/WeeklyView.tsx @@ -1408,9 +1408,10 @@ export default function WeeklyView() { return () => el.removeEventListener("wheel", handler); }, [showSomeday, somedayExpanded]); const saveSetting = async (key: string, value: any) => { - // Save per-device settings to cookie as well + // Per-device settings: save to cookie ONLY (not DB) so each device keeps its own value if (DEVICE_SETTINGS_KEYS.includes(key)) { setCookie(`setting_${key}`, String(value)); + return; // Don't write to DB — that would overwrite other devices } try { await fetch("/api/user/profile", {