mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 04:39:20 +00:00
improvement: change notifications logic
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user