Fixing alerts to not show already handled alerts.

logins
Thomas Hintz 5 years ago
parent 69a563d689
commit 2bdab2ab6e

@ -190,11 +190,12 @@ export default function(state = initialState, action) {
case MARK_ACTION_CHANGE_HANDLED: case MARK_ACTION_CHANGE_HANDLED:
return { ...state, ui: { ...state.ui, actionChangeHandled: true }}; return { ...state, ui: { ...state.ui, actionChangeHandled: true }};
case ALERT: case ALERT:
let existingAlert = state.ui.alerts[action.id];
let alerts = { ...state.ui.alerts, let alerts = { ...state.ui.alerts,
[action.id]: { type: action.value, [action.id]: { type: action.value,
id: action.id, id: action.id,
contents: action.contents, contents: action.contents,
handled: false } handled: existingAlert ? existingAlert.handled : false }
}; };
return { ...state, ui: { ...state.ui, return { ...state, ui: { ...state.ui,
alerts, alerts,

Loading…
Cancel
Save