From e190c7e3039395b33f9b540ddf4b8c952467e4b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 2 Nov 2022 13:39:52 +0100 Subject: [PATCH 1/2] Do not render the workspace if file list is hidden MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/helpers/files.js | 7 +++++++ src/views/RichWorkspace.vue | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) 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 @@ -->