aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-01-21 00:43:47 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2024-01-25 15:07:52 +0100
commit2893d1b926d098a743d226590c3b96987843c6f8 (patch)
treea75c2dacefe20433faab614736c51b011b831e23 /apps
parenta62bb3a581b73b8684375bd8f02e3870defa6282 (diff)
downloadnextcloud-server-2893d1b926d098a743d226590c3b96987843c6f8.tar.gz
nextcloud-server-2893d1b926d098a743d226590c3b96987843c6f8.zip
fix(files): Make sure `$navigation` is observable to react on changes
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/src/main.ts3
-rw-r--r--apps/files/src/views/FilesList.vue3
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/src/main.ts b/apps/files/src/main.ts
index fe3e2e172cb..7b25c88a697 100644
--- a/apps/files/src/main.ts
+++ b/apps/files/src/main.ts
@@ -33,7 +33,8 @@ Vue.use(PiniaVuePlugin)
const pinia = createPinia()
// Init Navigation Service
-const Navigation = getNavigation()
+// This only works with Vue 2 - with Vue 3 this will not modify the source but return just a oberserver
+const Navigation = Vue.observable(getNavigation())
Vue.prototype.$navigation = Navigation
// Init Files App Settings Service
diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue
index a3ef2c5f007..fabfccd6ca1 100644
--- a/apps/files/src/views/FilesList.vue
+++ b/apps/files/src/views/FilesList.vue
@@ -222,8 +222,7 @@ export default defineComponent({
},
currentView(): View {
- return (this.$navigation.active
- || this.$navigation.views.find(view => view.id === 'files')) as View
+ return this.$navigation.active || this.$navigation.views.find((view) => view.id === (this.$route.params?.view ?? 'files'))
},
/**