Fix notification minus count
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
@@ -103,6 +103,10 @@ class Notifications extends EventEmitter {
|
|||||||
const prevTotal = noti.total;
|
const prevTotal = noti.total;
|
||||||
noti.total -= total;
|
noti.total -= total;
|
||||||
noti.highlight -= highlight;
|
noti.highlight -= highlight;
|
||||||
|
if (noti.total < 0) {
|
||||||
|
noti.total = 0;
|
||||||
|
noti.highlight = 0;
|
||||||
|
}
|
||||||
if (childId && noti.from !== null) {
|
if (childId && noti.from !== null) {
|
||||||
noti.from.delete(childId);
|
noti.from.delete(childId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user