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