Fix notification minus count
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
aca2c3a9dd
commit
603d373cee
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue