Merge remote-tracking branch 'parent/main' into kb_migration_development
This commit is contained in:
commit
551a676161
67 changed files with 751 additions and 548 deletions
|
@ -93,4 +93,6 @@ const reducers = {
|
|||
followed_tags,
|
||||
};
|
||||
|
||||
export default combineReducers(reducers);
|
||||
const rootReducer = combineReducers(reducers);
|
||||
|
||||
export { rootReducer };
|
|
@ -14,18 +14,18 @@ const initialState = Record<MissedUpdatesState>({
|
|||
|
||||
export function missedUpdatesReducer(
|
||||
state = initialState,
|
||||
action: Action<string>,
|
||||
action: Action<string>
|
||||
) {
|
||||
switch (action.type) {
|
||||
case focusApp.type:
|
||||
return state.set('focused', true).set('unread', 0);
|
||||
case unfocusApp.type:
|
||||
return state.set('focused', false);
|
||||
case NOTIFICATIONS_UPDATE:
|
||||
return state.get('focused')
|
||||
? state
|
||||
: state.update('unread', (x) => x + 1);
|
||||
default:
|
||||
return state;
|
||||
case focusApp.type:
|
||||
return state.set('focused', true).set('unread', 0);
|
||||
case unfocusApp.type:
|
||||
return state.set('focused', false);
|
||||
case NOTIFICATIONS_UPDATE:
|
||||
return state.get('focused')
|
||||
? state
|
||||
: state.update('unread', (x) => x + 1);
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue