Skip to content

Commit

Permalink
New field type: Chisel user. Live updates fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nes-si committed Dec 12, 2021
1 parent 6e21ffa commit b6530f0
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/ducks/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ export default function navReducer(state = initialState, action) {
};

case SHOW_ALERT:
if (JSON.stringify(action.params) == JSON.stringify(state.alertParams))
return state;
return {
...state,
alertShowing: true,
Expand All @@ -238,6 +240,9 @@ export default function navReducer(state = initialState, action) {
};

case SHOW_MODAL:
if (action.modalType == state.modalType &&
JSON.stringify(action.params) == JSON.stringify(state.modalParams))
return state;
return {
...state,
modalShowing: true,
Expand All @@ -249,21 +254,22 @@ export default function navReducer(state = initialState, action) {
return {...state, modalShowing: false};

case SHOW_NOTIFICATION:
if (JSON.stringify(action.notification) == JSON.stringify(state.notification))
return state;
return {
...state,
notification: action.notification
};

case CLOSE_NOTIFICATION:
if (action.notificationType && action.notificationType != state.notification?.type) {
return {...state};
} else { return {
if (!state.notification ||
action.notificationType && action.notificationType != state.notification?.type)
return state;
return {
...state,
notification: null
};

}

case LOCATION_CHANGE:
return {
...state,
Expand Down

0 comments on commit b6530f0

Please sign in to comment.