알림삭제 오류 수정

This commit is contained in:
Macbook
2026-06-04 15:40:52 +09:00
parent 87d100c41e
commit 938bb89323
3 changed files with 12 additions and 5 deletions
+3 -4
View File
@@ -3,9 +3,10 @@
*/
import {
getAppSettingsCache,
patchAppSettingsCache,
subscribeAppSettings,
} from '../hooks/useAppSettings';
import { saveAppSettings, type AppSettingsDto } from './backendApi';
import { saveAppSettings } from './backendApi';
import {
EMPTY_UI_PREFERENCES,
UI_PREFERENCES_VERSION,
@@ -64,9 +65,7 @@ export function patchUiPreferences(patch: Partial<UiPreferences>, immediate = fa
const next = deepMerge(current as Record<string, unknown>, patch as Record<string, unknown>) as UiPreferences;
next.v = UI_PREFERENCES_VERSION;
const cache = getAppSettingsCache();
const merged: AppSettingsDto = { ...cache, uiPreferences: next };
Object.assign(cache, merged);
patchAppSettingsCache({ uiPreferences: next });
pendingPatch = pendingPatch
? (deepMerge(pendingPatch as Record<string, unknown>, patch as Record<string, unknown>) as Partial<UiPreferences>)