diff options
| author | Shpuld Shpludson <shp@cock.li> | 2020-05-02 11:19:05 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2020-05-02 11:19:05 +0000 |
| commit | 5f90b6a384583a00769eeca3a6c6e2deec8bdd24 (patch) | |
| tree | fb6b7307cbb3785ae0b1da17fe7b1ac730e9965f /src/modules/statuses.js | |
| parent | c67e9daf068c5a7eafaa7ce6a6418c8916a4f118 (diff) | |
| parent | 92ccaa97bb0a2c15b96e2fbcf03823ba902dc516 (diff) | |
Merge branch 'fix/follow-request-notification-bugfixes' into 'develop'
Fix remaining follow request notif problems
Closes #823
See merge request pleroma/pleroma-fe!1096
Diffstat (limited to 'src/modules/statuses.js')
| -rw-r--r-- | src/modules/statuses.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 239f41eb..cd8c1dba 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -525,6 +525,10 @@ export const mutations = { notification.seen = true }) }, + markSingleNotificationAsSeen (state, { id }) { + const notification = find(state.notifications.data, n => n.id === id) + if (notification) notification.seen = true + }, dismissNotification (state, { id }) { state.notifications.data = state.notifications.data.filter(n => n.id !== id) }, @@ -691,9 +695,20 @@ const statuses = { credentials: rootState.users.currentUser.credentials }) }, + markSingleNotificationAsSeen ({ rootState, commit }, { id }) { + commit('markSingleNotificationAsSeen', { id }) + apiService.markNotificationsAsSeen({ + single: true, + id, + credentials: rootState.users.currentUser.credentials + }) + }, + dismissNotificationLocal ({ rootState, commit }, { id }) { + commit('dismissNotification', { id }) + }, dismissNotification ({ rootState, commit }, { id }) { + commit('dismissNotification', { id }) rootState.api.backendInteractor.dismissNotification({ id }) - .then(() => commit('dismissNotification', { id })) }, updateNotification ({ rootState, commit }, { id, updater }) { commit('updateNotification', { id, updater }) |
