From af6a65cbf3a122f92d91fe302e7d60e6c6a5416d Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 4 Jun 2014 10:48:01 +0200 Subject: [PATCH] Do not update action icon recipients for file list Since the files app doesn't have the recipient information on load it cannot initially render the recipients in the action icons. For this reason the action icon will not be updated with the recipients after changing the shares, for consistency. --- apps/files_sharing/js/share.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index e833612fb5..d63a590fb8 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -115,6 +115,11 @@ OC.Share.showDropDown(itemType, $tr.data('id'), appendTo, true, possiblePermissions, filename); } $('#dropdown').on('sharesChanged', function(ev) { + // files app current cannot show recipients on load, so we don't update the + // icon when changed for consistency + if (context.fileList.$el.closest('#app-content-files').length) { + return; + } var recipients = _.pluck(ev.shares[OC.Share.SHARE_TYPE_USER], 'share_with_displayname'); var groupRecipients = _.pluck(ev.shares[OC.Share.SHARE_TYPE_GROUP], 'share_with_displayname'); recipients = recipients.concat(groupRecipients);