aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 3e311655c91..96436d33a2c 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -172,7 +172,8 @@
*/
destroy: function() {
// TODO: also unregister other event handlers
- this.fileActions.removeUpdateListener(this._onFileActionsUpdated);
+ this.fileActions.off('registerAction', this._onFileActionsUpdated);
+ this.fileActions.off('setDefault', this._onFileActionsUpdated);
},
_initFileActions: function(fileActions) {
@@ -182,7 +183,8 @@
this.fileActions.registerDefaultActions();
}
this._onFileActionsUpdated = _.debounce(_.bind(this._onFileActionsUpdated, this), 100);
- this.fileActions.addUpdateListener(this._onFileActionsUpdated);
+ this.fileActions.on('registerAction', this._onFileActionsUpdated);
+ this.fileActions.on('setDefault', this._onFileActionsUpdated);
},
/**