From 8de29843497efed3eff05db1f90a15937d0a504c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 15 May 2023 13:03:13 +0200 Subject: reload filelist when adding or removing shares Signed-off-by: Robin Appelman Signed-off-by: nextcloud-command --- apps/files/js/filelist.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apps/files/js') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index e3052ea9fe8..442fdec9322 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -383,6 +383,9 @@ } }); + window._nc_event_bus.subscribe('files_sharing:share:created', () => { self.reload(true) }); + window._nc_event_bus.subscribe('files_sharing:share:deleted', () => { self.reload(true) }); + this.$fileList.on('click','td.filename>a.name, td.filesize, td.date', _.bind(this._onClickFile, this)); this.$fileList.on("droppedOnFavorites", function (event, file) { @@ -2201,7 +2204,7 @@ * * @return ajax call object */ - reload: function() { + reload: function(keepOpen) { this._selectedFiles = {}; this._selectionSummary.clear(); if (this._currentFileModel) { @@ -2216,7 +2219,7 @@ properties: this._getWebdavProperties() } ); - if (this._detailsView) { + if (this._detailsView && !keepOpen) { // close sidebar this._updateDetailsView(null); } -- cgit v1.2.3