Skip to content

Commit

Permalink
fix: clear ancestor data in app wrapper
Browse files Browse the repository at this point in the history
This fixes an issue where the right sidebar would display wrong shares when being inside a space and opening a file from another space (e.g. via the search results).
  • Loading branch information
Jannik Stehle committed Oct 29, 2024
1 parent 01f1887 commit f20c79c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-sidebar-showing-wrong-shares
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Sidebar showing wrong shares

We've fixed a bug where the right sidebar would display wrong shares when being inside a space and opening a file from another space (e.g. via the search results).

https://github.com/owncloud/web/pull/11830
https://github.com/owncloud/web/issues/11787
8 changes: 8 additions & 0 deletions packages/web-pkg/src/components/AppTemplates/AppWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,14 @@ export default defineComponent({
let autosaveIntervalId: ReturnType<typeof setInterval> = null
onMounted(() => {
if (resourcesStore.ancestorMetaData?.['/'] && unref(space)) {
const clearAncestorData = resourcesStore.ancestorMetaData['/'].spaceId !== unref(space).id
if (clearAncestorData) {
// clear ancestor data in case the user switched spaces (e.g. by opening a file via search results)
resourcesStore.setAncestorMetaData({})
}
}
if (!unref(isEditor)) {
return
}
Expand Down

0 comments on commit f20c79c

Please sign in to comment.