|
193 | 193 | var $tr = fileList.findFileEl(fileInfoModel.get('name')); |
194 | 194 |
|
195 | 195 | // We count email shares as link share |
196 | | - var hasLinkShare = shareModel.hasLinkShare(); |
| 196 | + var hasLinkShares = shareModel.hasLinkShares(); |
197 | 197 | shareModel.get('shares').forEach(function (share) { |
198 | 198 | if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) { |
199 | | - hasLinkShare = true; |
| 199 | + hasLinkShares = true; |
200 | 200 | } |
201 | 201 | }); |
202 | 202 |
|
203 | 203 | OCA.Sharing.Util._updateFileListDataAttributes(fileList, $tr, shareModel); |
204 | | - if (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), hasLinkShare)) { |
| 204 | + if (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), hasLinkShares)) { |
205 | 205 | // remove icon, if applicable |
206 | 206 | OC.Share.markFileAsShared($tr, false, false); |
207 | 207 | } |
|
249 | 249 | * |
250 | 250 | * @param $tr file element of the file to update |
251 | 251 | * @param {boolean} hasUserShares true if a user share exists |
252 | | - * @param {boolean} hasLinkShare true if a link share exists |
| 252 | + * @param {boolean} hasLinkShares true if a link share exists |
253 | 253 | * |
254 | 254 | * @return {boolean} true if the icon was set, false otherwise |
255 | 255 | */ |
256 | | - _updateFileActionIcon: function($tr, hasUserShares, hasLinkShare) { |
| 256 | + _updateFileActionIcon: function($tr, hasUserShares, hasLinkShares) { |
257 | 257 | // if the statuses are loaded already, use them for the icon |
258 | 258 | // (needed when scrolling to the next page) |
259 | | - if (hasUserShares || hasLinkShare || $tr.attr('data-share-recipient-data') || $tr.attr('data-share-owner')) { |
260 | | - OC.Share.markFileAsShared($tr, true, hasLinkShare); |
| 259 | + if (hasUserShares || hasLinkShares || $tr.attr('data-share-recipient-data') || $tr.attr('data-share-owner')) { |
| 260 | + OC.Share.markFileAsShared($tr, true, hasLinkShares); |
261 | 261 | return true; |
262 | 262 | } |
263 | 263 | return false; |
|
0 commit comments