Listen to the notification event to reload the file list

This commit is contained in:
Joas Schilling 2016-02-09 17:18:07 +01:00
parent 65e1e4a202
commit 75d552b29e
1 changed files with 13 additions and 1 deletions

View File

@ -69,9 +69,21 @@
filesApp: null,
attach: function(filesApp) {
var self = this;
this.filesApp = filesApp;
this.processIncomingShareFromUrl();
this.processSharesToConfirm();
if (!$('#header').find('div.notifications').length) {
// No notification app, display the modal
this.processSharesToConfirm();
}
$('body').on('OCA.Notification.Action', function(e) {
if (e.notification.app === 'files_sharing' && e.notification.object_type === 'remote_share' && e.action.type === 'POST') {
// User accepted a remote share reload
self.filesApp.fileList.reload();
}
});
},
/**