From 586b3a9683421181b7cd66aff2d3fabd0f34531e Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 27 Jun 2014 13:36:18 +0200 Subject: Sync file list with file actions Whenever file actions are registered later, now the file lists are automatically notified. Added FileActions.addUpdateListener() to be able to receive such notifications. This removes the need for apps to manually call FileActions.display() after registering new actions. This fixes issues with race conditions when file actions are registered after the file list was already rendered. --- apps/files_sharing/tests/js/shareSpec.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/files_sharing/tests/js/shareSpec.js') diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js index 455addaccc0..3d4fc754821 100644 --- a/apps/files_sharing/tests/js/shareSpec.js +++ b/apps/files_sharing/tests/js/shareSpec.js @@ -70,6 +70,8 @@ describe('OCA.Sharing.Util tests', function() { OCA.Files.FileList.prototype = oldFileListPrototype; delete OCA.Sharing.sharesLoaded; delete OC.Share.droppedDown; + fileList.destroy(); + fileList = null; OC.Share.statuses = {}; OC.Share.currentShares = {}; }); -- cgit v1.2.3