feat: Archive all notifications (#6599)

* feat: Archive all notifications

* use non-modal notification menu

* don't show icons in context menu
This commit is contained in:
Hemachandar
2024-02-28 07:34:33 +05:30
committed by GitHub
parent 60e52d0423
commit 0f7bae13e2
8 changed files with 191 additions and 17 deletions

View File

@@ -54,6 +54,20 @@ export default class NotificationsStore extends Store<Notification> {
});
};
/**
* Mark all notifications as archived.
*/
@action
markAllAsArchived = async () => {
await client.post("/notifications.update_all", {
archivedAt: new Date().toISOString(),
});
runInAction("NotificationsStore#markAllAsArchived", () => {
this.clear();
});
};
/**
* Returns the approximate number of unread notifications.
*/