Listen to the notification event to reload the file list
This commit is contained in:
parent
65e1e4a202
commit
75d552b29e
|
@ -69,9 +69,21 @@
|
|||
filesApp: null,
|
||||
|
||||
attach: function(filesApp) {
|
||||
var self = this;
|
||||
this.filesApp = filesApp;
|
||||
this.processIncomingShareFromUrl();
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue