알림삭제 오류 수정
This commit is contained in:
@@ -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>)
|
||||
|
||||
Reference in New Issue
Block a user