mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-01-31 17:45:22 +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:
commit
07b938e80b
@ -73,6 +73,7 @@ export default {
|
|||||||
window.removeEventListener('dragover', this.onDragOver)
|
window.removeEventListener('dragover', this.onDragOver)
|
||||||
window.removeEventListener('drop', this.handleDrop)
|
window.removeEventListener('drop', this.handleDrop)
|
||||||
this.$store.dispatch('TimelineSpace/stopStreamings')
|
this.$store.dispatch('TimelineSpace/stopStreamings')
|
||||||
|
this.$store.dispatch('TimelineSpace/unbindStreamings')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async clear () {
|
async clear () {
|
||||||
|
@ -10,7 +10,7 @@ export default {
|
|||||||
})
|
})
|
||||||
throw err
|
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/fetchContentsTimelines', account)
|
||||||
await this.$store.dispatch('TimelineSpace/startStreamings', account)
|
await this.$store.dispatch('TimelineSpace/startStreamings', account)
|
||||||
return account
|
return account
|
||||||
|
@ -211,11 +211,13 @@ const TimelineSpace = {
|
|||||||
dispatch('startPublicStreaming')
|
dispatch('startPublicStreaming')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stopStreamings ({ dispatch }, account) {
|
stopStreamings ({ dispatch }) {
|
||||||
dispatch('stopUserStreaming')
|
dispatch('stopUserStreaming')
|
||||||
dispatch('stopDirectMessagesStreaming')
|
dispatch('stopDirectMessagesStreaming')
|
||||||
dispatch('stopLocalStreaming')
|
dispatch('stopLocalStreaming')
|
||||||
dispatch('stopPublicStreaming')
|
dispatch('stopPublicStreaming')
|
||||||
|
},
|
||||||
|
unbindStreamings ({ dispatch }) {
|
||||||
dispatch('unbindUserStreaming')
|
dispatch('unbindUserStreaming')
|
||||||
dispatch('unbindDirectMessagesStreaming')
|
dispatch('unbindDirectMessagesStreaming')
|
||||||
dispatch('unbindLocalStreaming')
|
dispatch('unbindLocalStreaming')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user