Fix toast and sync settings
- Fix issue where toast notifications were not disappearing. - Ensure sync settings are turned off upon logout.
This commit is contained in:
@@ -47,11 +47,26 @@ export function dispatch(action: Action) {
|
||||
time: now
|
||||
};
|
||||
|
||||
// REMOVE_TOAST 액션 우선순위 높임
|
||||
if (action.type === actionTypes.REMOVE_TOAST) {
|
||||
// 즉시 처리
|
||||
memoryState = reducer(memoryState, action);
|
||||
listeners.forEach((listener) => {
|
||||
listener(memoryState);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 실제 상태 업데이트 및 리스너 호출
|
||||
memoryState = reducer(memoryState, action)
|
||||
memoryState = reducer(memoryState, action);
|
||||
listeners.forEach((listener) => {
|
||||
listener(memoryState)
|
||||
})
|
||||
listener(memoryState);
|
||||
});
|
||||
}
|
||||
|
||||
// 토스트 모두 제거 헬퍼 함수
|
||||
export function clearAllToasts() {
|
||||
dispatch({ type: actionTypes.REMOVE_TOAST });
|
||||
}
|
||||
|
||||
export { memoryState };
|
||||
|
||||
Reference in New Issue
Block a user