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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user