summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-05-15 13:03:13 +0200
committerRobin Appelman <robin@icewind.nl>2023-06-09 17:44:46 +0200
commit1285a2bc9ef235407072ff344541bf0e751d9ca6 (patch)
treef6a46241e5af3cf4d22b9c0dca47e4daacc627f2 /apps/files
parentca6618d761891e951ef064a174ef54e0109a783f (diff)
downloadnextcloud-server-1285a2bc9ef235407072ff344541bf0e751d9ca6.tar.gz
nextcloud-server-1285a2bc9ef235407072ff344541bf0e751d9ca6.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')
-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 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);
}