diff options
| author | Henry Jameson <me@hjkos.com> | 2023-11-13 17:29:25 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2023-11-13 17:29:25 +0200 |
| commit | ec2937ec1f3b0ae153f79604eb35b57ffe0f9af2 (patch) | |
| tree | 43f77d71432accfbd90dc9747224c22c1393293c /src/modules/statuses.js | |
| parent | c059f4a7ee16c0128c348c43c9d468e7cfdb5ef7 (diff) | |
add options for marking single notification as read
Diffstat (limited to 'src/modules/statuses.js')
| -rw-r--r-- | src/modules/statuses.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 9b4cd175..6e331d16 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -17,6 +17,10 @@ import { isValidNotification, maybeShowNotification } from '../services/notification_utils/notification_utils.js' +import { + closeDesktopNotification, + closeAllDesktopNotifications +} from '../services/desktop_notification_utils/desktop_notification_utils.js' import apiService from '../services/api/api.service.js' const emptyTl = (userId = 0) => ({ @@ -726,6 +730,8 @@ const statuses = { apiService.markNotificationsAsSeen({ id: rootState.statuses.notifications.maxId, credentials: rootState.users.currentUser.credentials + }).then(() => { + closeAllDesktopNotifications(rootState) }) }, markSingleNotificationAsSeen ({ rootState, commit }, { id }) { @@ -734,6 +740,8 @@ const statuses = { single: true, id, credentials: rootState.users.currentUser.credentials + }).then(() => { + closeDesktopNotification(rootState, id) }) }, dismissNotificationLocal ({ rootState, commit }, { id }) { |
