From 1285a2bc9ef235407072ff344541bf0e751d9ca6 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') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 2d93ced7100..ae5eac7eb36 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) { @@ -2199,7 +2202,7 @@ * * @return ajax call object */ - reload: function() { + reload: function(keepOpen) { this._selectedFiles = {}; this._selectionSummary.clear(); if (this._currentFileModel) { @@ -2214,7 +2217,7 @@ properties: this._getWebdavProperties() } ); - if (this._detailsView) { + if (this._detailsView && !keepOpen) { // close sidebar this._updateDetailsView(null); } -- cgit v1.2.3