From 8a5632d3a13bd84cda3c5bd499020e962e549f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 8 Jan 2020 09:14:06 +0100 Subject: [PATCH] Do not show sidebar on rename (fixes #18613) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files/js/filelist.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 108e10f4df..821a11804b 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -630,7 +630,7 @@ * @param {string|OCA.Files.FileInfoModel} fileName file name from the current list or a FileInfoModel object * @param {boolean} [show=true] whether to open the sidebar if it was closed */ - _updateDetailsView: function(fileName) { + _updateDetailsView: function(fileName, show) { if (!(OCA.Files && OCA.Files.Sidebar)) { console.error('No sidebar available'); return; @@ -659,7 +659,9 @@ this._currentFileModel = model; // open sidebar and set file - OCA.Files.Sidebar.open(path.replace('//', '/')) + if (typeof show === 'undefined' || !!show || (OCA.Files.Sidebar.file !== '')) { + OCA.Files.Sidebar.open(path.replace('//', '/')) + } }, /**