Merge pull request #922 from h3poteto/iss-920

closes #920 Unbind streaming for mentions when change accounts
This commit is contained in:
AkiraFukushima 2019-05-22 01:05:04 +09:00 committed by GitHub
commit 3316d6a0a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -120,6 +120,7 @@ const actions: ActionTree<TimelineSpaceState, RootState> = {
await dispatch('fetchContentsTimelines', account).catch(_ => {
throw new TimelineFetchError()
})
await dispatch('unbindStreamings')
await dispatch('bindStreamings', account)
dispatch('startStreamings', account)
dispatch('fetchEmojis', account)
@ -415,6 +416,7 @@ const actions: ActionTree<TimelineSpaceState, RootState> = {
},
unbindUserStreaming: () => {
ipcRenderer.removeAllListeners('update-start-user-streaming')
ipcRenderer.removeAllListeners('mention-start-user-streaming')
ipcRenderer.removeAllListeners('notification-start-user-streaming')
ipcRenderer.removeAllListeners('error-start-user-streaming')
},