aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/share.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/js/share.js')
-rw-r--r--apps/files_sharing/js/share.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index a40d40e6b8a..01c2ccfb863 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -161,8 +161,17 @@
shareTab.on('sharesChanged', function(shareModel) {
var fileInfoModel = shareModel.fileInfoModel;
var $tr = fileList.findFileEl(fileInfoModel.get('name'));
+
+ // We count email shares as link share
+ var hasLinkShare = shareModel.hasLinkShare();
+ shareModel.get('shares').forEach(function (share) {
+ if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {
+ hasLinkShare = true;
+ }
+ });
+
OCA.Sharing.Util._updateFileListDataAttributes(fileList, $tr, shareModel);
- if (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), shareModel.hasLinkShare())) {
+ if (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), hasLinkShare)) {
// remove icon, if applicable
OC.Share.markFileAsShared($tr, false, false);
}