Skip to content

Commit

Permalink
Merge pull request #4155 from nextcloud/fix-event-handler-deregistrat…
Browse files Browse the repository at this point in the history
…ion-in-topbar

Fix event handler deregistration in TopBar
  • Loading branch information
nickvergessen authored Sep 16, 2020
2 parents a016fa2 + 47c615e commit 58274a1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/components/TopBar/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,7 @@ export default {
document.addEventListener('MSFullscreenChange', this.fullScreenChanged, false)
document.addEventListener('webkitfullscreenchange', this.fullScreenChanged, false)
// Add call layout hint listener
EventBus.$on('toggleLayoutHint', (display) => {
this.showLayoutHint = display
})
EventBus.$on('toggleLayoutHint', this.handleToggleLayoutHint)
},
beforeDestroy() {
Expand All @@ -370,9 +368,7 @@ export default {
document.removeEventListener('MSFullscreenChange', this.fullScreenChanged, false)
document.removeEventListener('webkitfullscreenchange', this.fullScreenChanged, false)
// Remove call layout hint listener
EventBus.$off('toggleLayoutHint', (display) => {
this.showLayoutHint = display
})
EventBus.$off('toggleLayoutHint', this.handleToggleLayoutHint)
},
methods: {
Expand Down Expand Up @@ -489,6 +485,9 @@ export default {
this.$store.dispatch('isRenamingConversation', true)
this.$store.dispatch('showSidebar')
},
handleToggleLayoutHint(display) {
this.showLayoutHint = display
},
forceMuteOthers() {
callParticipantCollection.callParticipantModels.forEach(callParticipantModel => {
callParticipantModel.forceMute()
Expand Down

0 comments on commit 58274a1

Please sign in to comment.