mirror of
https://github.com/zoriya/flood.git
synced 2026-06-02 19:11:14 +00:00
NotificationStore: also reset notificationCount when clearAll
This commit is contained in:
@@ -7,7 +7,6 @@ const INITIAL_COUNT_STATE: NotificationCount = {total: 0, unread: 0, read: 0};
|
||||
class NotificationStore {
|
||||
notifications: Array<Notification> = [];
|
||||
notificationCount: NotificationCount = INITIAL_COUNT_STATE;
|
||||
ongoingPolls = {};
|
||||
|
||||
constructor() {
|
||||
makeAutoObservable(this);
|
||||
@@ -15,6 +14,7 @@ class NotificationStore {
|
||||
|
||||
clearAll() {
|
||||
this.notifications = [];
|
||||
this.notificationCount = INITIAL_COUNT_STATE;
|
||||
}
|
||||
|
||||
handleNotificationCountChange(notificationCount: NotificationCount) {
|
||||
|
||||
Reference in New Issue
Block a user