fix: Stop unbind events when reload, and call unbind when destroy
This commit is contained in:
parent
09f063ca17
commit
76d133f5b4
|
@ -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 () {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue