알림삭제 오류 수정

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
+8
View File
@@ -79,6 +79,14 @@ export function getAppSettingsCache(): AppSettingsDto {
return _cache ?? {};
}
/** 낙관적 캐시 패치 — _cache 가 null 일 때도 다음 로드 전까지 임시 보관 */
export function patchAppSettingsCache(patch: Partial<AppSettingsDto>): void {
if (_cache !== null) {
Object.assign(_cache, patch);
}
// _cache 가 null 이면 현재 로드 중이므로 건너뜀 (로드 완료 후 DB 저장값으로 덮어씌워짐)
}
export function subscribeAppSettings(listener: AppSettingsListener): () => void {
_listeners.add(listener);
return () => _listeners.delete(listener);