Skip to content

Commit

Permalink
Merge pull request #11831 from owncloud/fix/files-appearing-in-file-list
Browse files Browse the repository at this point in the history
fix: clear ancestor data in app wrapper
  • Loading branch information
kulmann authored Oct 31, 2024
2 parents 3a636b6 + e5afe1a commit 301b1dc
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/11831
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 301b1dc

Please sign in to comment.