diff options
| author | dave <starpumadev@gmail.com> | 2019-03-01 11:59:50 -0500 |
|---|---|---|
| committer | dave <starpumadev@gmail.com> | 2019-03-01 11:59:50 -0500 |
| commit | f3f9fbe3027bf5284adc05387e89d904884490b2 (patch) | |
| tree | f76f91a0ed640dfc502e6da5e8e84beef9c0defc /src/modules/statuses.js | |
| parent | bbe1821be7c098f3a23bd0dd54b4ec89a159e9c1 (diff) | |
#392: clean up notification stopping section
Diffstat (limited to 'src/modules/statuses.js')
| -rw-r--r-- | src/modules/statuses.js | 6 |
1 files changed, 6 insertions, 0 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 }) |
