projects
/
cinny.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aca2c3a
)
Fix notification minus count
author
Ajay Bura
<ajbura@gmail.com>
Wed, 27 Oct 2021 10:33:41 +0000
(16:03 +0530)
committer
Ajay Bura
<ajbura@gmail.com>
Wed, 27 Oct 2021 10:33:41 +0000
(16:03 +0530)
Signed-off-by: Ajay Bura <ajbura@gmail.com>
src/client/state/Notifications.js
patch
|
blob
|
history
diff --git
a/src/client/state/Notifications.js
b/src/client/state/Notifications.js
index f5ecce2b51c6c15b1dc690812bef828ba899c4e2..b5ba4e04cf7e49cc7a05da6eb7544634eb18fff9 100644
(file)
--- a/
src/client/state/Notifications.js
+++ b/
src/client/state/Notifications.js
@@
-103,6
+103,10
@@
class Notifications extends EventEmitter {
const prevTotal = noti.total;
noti.total -= total;
noti.highlight -= highlight;
+ if (noti.total < 0) {
+ noti.total = 0;
+ noti.highlight = 0;
+ }
if (childId && noti.from !== null) {
noti.from.delete(childId);
}