aboutsummaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/components/AppMenu.vue7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/components/AppMenu.vue b/core/src/components/AppMenu.vue
index ca96fa569c6..1b2e45e2c0b 100644
--- a/core/src/components/AppMenu.vue
+++ b/core/src/components/AppMenu.vue
@@ -68,6 +68,7 @@ export default {
return {
apps: loadState('core', 'apps', {}),
appLimit: 0,
+ observer: null,
}
},
computed: {
@@ -87,9 +88,13 @@ export default {
},
},
mounted() {
- window.addEventListener('resize', this.resize)
+ this.observer = new ResizeObserver(this.resize)
+ this.observer.observe(this.$el)
this.resize()
},
+ beforeDestroy() {
+ this.observer.disconnect()
+ },
methods: {
setNavigationCounter(id, counter) {
this.$set(this.apps[id], 'unread', counter)