aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-10-18 11:17:52 +0200
committerJoas Schilling <coding@schilljs.com>2022-10-18 20:58:10 +0200
commitaa31002b03229932c532f05045c9f8852245ffe1 (patch)
tree144f83057d9e8ff73a55aa5a240e97bd9f475131 /core
parentc78bd45c64d9695724fc44fe8453a88824b85f2f (diff)
downloadnextcloud-server-aa31002b03229932c532f05045c9f8852245ffe1.tar.gz
nextcloud-server-aa31002b03229932c532f05045c9f8852245ffe1.zip
🧭 Fix rebuilding the navigation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core')
-rw-r--r--core/src/components/AppMenu.vue6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/components/AppMenu.vue b/core/src/components/AppMenu.vue
index 0a337340ccb..2ee91c30f40 100644
--- a/core/src/components/AppMenu.vue
+++ b/core/src/components/AppMenu.vue
@@ -60,6 +60,7 @@
<script>
import { loadState } from '@nextcloud/initial-state'
+import { subscribe, unsubscribe } from '@nextcloud/event-bus'
import NcActions from '@nextcloud/vue/dist/Components/NcActions'
import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink'
@@ -95,14 +96,19 @@ export default {
this.observer = new ResizeObserver(this.resize)
this.observer.observe(this.$el)
this.resize()
+ subscribe('nextcloud:app-menu.refresh', this.setApps)
},
beforeDestroy() {
this.observer.disconnect()
+ unsubscribe('nextcloud:app-menu.refresh', this.setApps)
},
methods: {
setNavigationCounter(id, counter) {
this.$set(this.apps[id], 'unread', counter)
},
+ setApps({ apps }) {
+ this.apps = apps
+ },
resize() {
const availableWidth = this.$el.offsetWidth
let appCount = Math.floor(availableWidth / 50) - 1