improvement: change notifications logic

This commit is contained in:
canove
2020-09-25 19:20:31 -03:00
parent 5396837db4
commit 72c3332401
2 changed files with 37 additions and 4 deletions

View File

@@ -96,6 +96,7 @@ const reducer = (state, action) => {
if (ticketIndex !== -1) {
state[ticketIndex].unreadMessages = 0;
}
return [...state];
}
@@ -108,6 +109,7 @@ const reducer = (state, action) => {
} else {
state.unshift(ticket);
}
return [...state];
}
@@ -119,6 +121,7 @@ const reducer = (state, action) => {
state[ticketIndex] = ticket;
state.unshift(state.splice(ticketIndex, 1)[0]);
}
return [...state];
}
@@ -128,6 +131,7 @@ const reducer = (state, action) => {
if (ticketIndex !== -1) {
state.splice(ticketIndex, 1);
}
return [...state];
}