From 6e43d405ce7e2899d680b2dc72af34b5db60e196 Mon Sep 17 00:00:00 2001 From: mykh-hailo Date: Tue, 5 May 2026 22:52:54 -0400 Subject: [PATCH] fix: folder tree selection after any action in main content Signed-off-by: mykh-hailo --- .../components/FilesNavigationListItem.vue | 5 +++- apps/files/src/views/FilesNavigation.vue | 28 ++++++++++++++++++- dist/files-main.js | 4 +-- dist/files-main.js.map | 2 +- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/apps/files/src/components/FilesNavigationListItem.vue b/apps/files/src/components/FilesNavigationListItem.vue index f5f2bf01156ce..deaf5e0174869 100644 --- a/apps/files/src/components/FilesNavigationListItem.vue +++ b/apps/files/src/components/FilesNavigationListItem.vue @@ -7,7 +7,7 @@ import type { IView } from '@nextcloud/files' import { getCanonicalLocale, getLanguage } from '@nextcloud/l10n' -import { computed, onMounted, ref } from 'vue' +import { computed, inject, onMounted, ref } from 'vue' import NcAppNavigationItem from '@nextcloud/vue/components/NcAppNavigationItem' import NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper' import { useVisibleViews } from '../composables/useViews.ts' @@ -62,6 +62,8 @@ const sortedChildViews = computed(() => childViews.value.slice().sort((a, b) => return collator.compare(a.name, b.name) })) const hasChildViews = computed(() => childViews.value.length > 0) +const activeViewId = inject('currentNavigationView', ref(undefined)) +const isActiveView = computed(() => activeViewId.value.id === props.view.id) const navigationRoute = computed(() => { if (props.view.params) { @@ -138,6 +140,7 @@ export default {