diff --git a/src/helpers/files.js b/src/helpers/files.js index 46a7b058b1b..91cb26a2154 100644 --- a/src/helpers/files.js +++ b/src/helpers/files.js @@ -20,6 +20,7 @@ * */ +import { subscribe } from '@nextcloud/event-bus' import { openMimetypes } from './mime.js' import RichWorkspace from '../views/RichWorkspace.vue' import { imagePath } from '@nextcloud/router' @@ -170,6 +171,12 @@ const FilesWorkspacePlugin = { store, }).$mount(this.el) + subscribe('files:navigation:changed', () => { + // Expose if the default file list is active to the component + // to only render the workspace if the file list is actually visible + vm.active = OCA.Files.App.getCurrentFileList() === fileList + }) + fileList.$el.on('urlChanged', data => { vm.path = data.dir.toString() }) diff --git a/src/views/RichWorkspace.vue b/src/views/RichWorkspace.vue index 1d9f18eecec..892c4d3256f 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -21,7 +21,7 @@ -->