From 581233665bb7516c2da5cd3bd74f030c08ff10f2 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/4] 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 7b603615416..b95f06bcf4b 100644 --- a/src/helpers/files.js +++ b/src/helpers/files.js @@ -21,6 +21,7 @@ */ import { loadState } from '@nextcloud/initial-state' +import { subscribe } from '@nextcloud/event-bus' import { openMimetypes } from './mime.js' import { getSharingToken } from './token.js' import RichWorkspace from '../views/RichWorkspace.vue' @@ -174,6 +175,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 06916d1bfa3..c0a86d1e9a4 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -21,7 +21,7 @@ -->