]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not show sidebar on rename (fixes #18613)
authorJulius Härtl <jus@bitgrid.net>
Wed, 8 Jan 2020 08:14:06 +0000 (09:14 +0100)
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Wed, 15 Jan 2020 10:00:07 +0000 (11:00 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/js/filelist.js

index 108e10f4df65a2447abc0c2cf2db5bf5a3843073..821a11804b4848dba3d7e6c5f559bf93f69d4ebb 100644 (file)
                 * @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;
                        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('//', '/'))
+                       }
                },
 
                /**