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 endless sidebar loading on search- and favorites-page #8667

Merged
merged 1 commit into from
Mar 22, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ The performance when loading folders and share indicators has been improved by o
https://github.com/owncloud/web/issues/7721
https://github.com/owncloud/web/pull/8349
https://github.com/owncloud/web/pull/8482
https://github.com/owncloud/web/pull/8667
13 changes: 5 additions & 8 deletions packages/web-app-files/src/components/SideBar/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ export default defineComponent({
unref(isSharedViaLinkLocation)
)
})
const isFlatFileList = computed(() => {
return unref(isShareLocation) || unref(isSearchLocation) || unref(isFavoritesLocation)
})

const availablePanels = computed((): Panel[] => {
const { panels } = store.getters.fileSideBars.reduce(
Expand Down Expand Up @@ -244,13 +247,7 @@ export default defineComponent({
path: unref(highlightedFile).path,
storageId: unref(highlightedFile).fileId,
// cache must not be used on flat file lists that gather resources form various locations
useCached: !(
unref(isSharedWithMeLocation) ||
unref(isSharedWithOthersLocation) ||
unref(isSharedViaLinkLocation) ||
unref(isSearchLocation) ||
unref(isFavoritesLocation)
)
useCached: !unref(isFlatFileList)
})
}

Expand Down Expand Up @@ -287,7 +284,7 @@ export default defineComponent({
return
}

const currentFolderRequired = !unref(isShareLocation) && !unref(isProjectsLocation)
const currentFolderRequired = !unref(isFlatFileList) && !unref(isProjectsLocation)
if (!currentFolderRequired || unref(currentFolder)) {
store.commit('Files/PRUNE_SHARES')
loadedResource.value = null
Expand Down