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:
parent
8fb9e04346
commit
27ccd275f6
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "my-weekly-todo-list",
|
"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",
|
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -2287,6 +2287,7 @@ export default function WeeklyView() {
|
|||||||
// Per-device settings: save to cookie ONLY (not DB) so each device keeps its own value
|
// Per-device settings: save to cookie ONLY (not DB) so each device keeps its own value
|
||||||
if (DEVICE_SETTINGS_KEYS.includes(key)) {
|
if (DEVICE_SETTINGS_KEYS.includes(key)) {
|
||||||
setCookie(`setting_${key}`, String(value));
|
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
|
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
|
// Also persist to device cookie so this device remembers its own preference on reload
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user