fix: S/M/L font size buttons now take effect immediately

saveSetting() for DEVICE_SETTINGS_KEYS (viewDays, cellDuration, startHour,
endHour, fontSize, showSubHourSlots) was saving to the cookie but returning
early before calling setProfile — so profile.fontSize never changed and the
CSS class font-size-s/m/l was never applied. Adding setProfile() to the
device-settings path fixes all of these keys at once while still keeping
the setting out of the DB.

v1.95.6
This commit is contained in:
mARTin 2026-04-13 09:56:19 +02:00
parent 8fb9e04346
commit 27ccd275f6
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "my-weekly-todo-list",
"version": "1.95.5",
"version": "1.95.6",
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
"main": "index.js",
"scripts": {

View File

@ -2287,6 +2287,7 @@ export default function WeeklyView() {
// 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));
setProfile((p: any) => ({ ...p, [key]: value })); // still update profile so rendering reacts immediately
return; // Don't write to DB — that would overwrite other devices
}
// Also persist to device cookie so this device remembers its own preference on reload