1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-01-31 09:35:16 +01:00

Merge pull request #720 from h3poteto/reload

fix: Stop unbind events when reload, and call unbind when destroy
This commit is contained in:
AkiraFukushima 2018-11-17 21:14:50 +09:00 committed by GitHub
commit 07b938e80b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -73,6 +73,7 @@ export default {
window.removeEventListener('dragover', this.onDragOver)
window.removeEventListener('drop', this.handleDrop)
this.$store.dispatch('TimelineSpace/stopStreamings')
this.$store.dispatch('TimelineSpace/unbindStreamings')
},
methods: {
async clear () {

View File

@ -10,7 +10,7 @@ export default {
})
throw err
})
await this.$store.dispatch('TimelineSpace/stopStreamings', account)
await this.$store.dispatch('TimelineSpace/stopStreamings')
await this.$store.dispatch('TimelineSpace/fetchContentsTimelines', account)
await this.$store.dispatch('TimelineSpace/startStreamings', account)
return account

View File

@ -211,11 +211,13 @@ const TimelineSpace = {
dispatch('startPublicStreaming')
}
},
stopStreamings ({ dispatch }, account) {
stopStreamings ({ dispatch }) {
dispatch('stopUserStreaming')
dispatch('stopDirectMessagesStreaming')
dispatch('stopLocalStreaming')
dispatch('stopPublicStreaming')
},
unbindStreamings ({ dispatch }) {
dispatch('unbindUserStreaming')
dispatch('unbindDirectMessagesStreaming')
dispatch('unbindLocalStreaming')