summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-05-15 13:03:13 +0200
committernextcloud-command <nextcloud-command@users.noreply.github.com>2023-05-22 13:22:52 +0000
commit8de29843497efed3eff05db1f90a15937d0a504c (patch)
tree01d565a68b15e4bb026cd850c36913ae0612dc39 /apps/files/js
parentb313e2a507776141c320af06bd3369e188bc59b8 (diff)
downloadnextcloud-server-8de29843497efed3eff05db1f90a15937d0a504c.tar.gz
nextcloud-server-8de29843497efed3eff05db1f90a15937d0a504c.zip
reload filelist when adding or removing shares
Signed-off-by: Robin Appelman <robin@icewind.nl> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js7
1 files changed, 5 insertions, 2 deletions
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);
}