Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clear ancestor data in app wrapper #11831

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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