aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/statuses.js6
-rw-r--r--src/modules/users.js4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index 028053cf..77a8ec72 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -401,6 +401,12 @@ const statuses = {
setNotificationsSilence ({ rootState, commit }, { value }) {
commit('setNotificationsSilence', { value })
},
+ stopFetchingNotifications ({ rootState, commit }) {
+ if (rootState.statuses.notifications.fetcherId) {
+ window.clearInterval(rootState.statuses.notifications.fetcherId)
+ }
+ commit('setNotificationFetcher', { fetcherId: null })
+ },
deleteStatus ({ rootState, commit }, status) {
commit('setDeleted', { status })
apiService.deleteStatus({ id: status.id, credentials: rootState.users.currentUser.credentials })
diff --git a/src/modules/users.js b/src/modules/users.js
index 84fe039b..0e1dd166 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -290,9 +290,7 @@ const users = {
store.commit('setToken', false)
store.dispatch('stopFetching', 'friends')
store.commit('setBackendInteractor', backendInteractorService())
- if (store.rootState.statuses.notifications.fetcherId) {
- window.clearInterval(store.rootState.statuses.notifications.fetcherId)
- }
+ store.dispatch('stopFetchingNotifications')
store.commit('resetStatuses')
},
loginUser (store, accessToken) {