Skip to content

Commit 02cc1b4

Browse files
committed
fix(files): Make sure $navigation is observable to react on changes
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 58f6220 commit 02cc1b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/files/src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ Vue.use(PiniaVuePlugin)
3434
const pinia = createPinia()
3535

3636
// Init Navigation Service
37-
const Navigation = getNavigation()
37+
// This only works with Vue 2 - with Vue 3 this will not modify the source but return just a oberserver
38+
const Navigation = Vue.observable(getNavigation())
3839
Vue.prototype.$navigation = Navigation
3940

4041
// Init Files App Settings Service

apps/files/src/views/FilesList.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,7 @@ export default defineComponent({
222222
},
223223
224224
currentView(): View {
225-
return (this.$navigation.active
226-
|| this.$navigation.views.find(view => view.id === 'files')) as View
225+
return this.$navigation.active || this.$navigation.views.find((view) => view.id === (this.$route.params?.view ?? 'files'))
227226
},
228227
229228
/**

0 commit comments

Comments
 (0)