summaryrefslogtreecommitdiffstats
path: root/core/src/components
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-10-18 22:27:34 +0200
committerGitHub <noreply@github.com>2022-10-18 22:27:34 +0200
commitb125e102b2d3d005f7509f11f38510dca2ad44a1 (patch)
tree36ed4d8f6f10c8a34f6c513f3a5b37c83667d2de /core/src/components
parentc78bd45c64d9695724fc44fe8453a88824b85f2f (diff)
parent6f6e906fd514d092579ab008b5a1098895c377f9 (diff)
downloadnextcloud-server-b125e102b2d3d005f7509f11f38510dca2ad44a1.tar.gz
nextcloud-server-b125e102b2d3d005f7509f11f38510dca2ad44a1.zip
Merge pull request #34650 from nextcloud/bugfix/noid/fix-rebuildNavigation
Fix rebuild navigation
Diffstat (limited to 'core/src/components')
-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