summaryrefslogtreecommitdiffstats
path: root/core/js/shareitemmodel.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-08-17 12:25:58 +0200
committerJoas Schilling <coding@schilljs.com>2017-04-26 13:38:12 +0200
commit17a31a51c62e36500f59b3c2d385ab79258f6bb6 (patch)
treed73fc6bb6a326cc34832c963bcda26e7417f35e1 /core/js/shareitemmodel.js
parent5b5c3a1773dab4960d41aafc4150859a308311b7 (diff)
downloadnextcloud-server-17a31a51c62e36500f59b3c2d385ab79258f6bb6.tar.gz
nextcloud-server-17a31a51c62e36500f59b3c2d385ab79258f6bb6.zip
Fix share indicator handling
Properly update the fileInfoModel with the updated share types, which also updates the file list row indicator properly
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r--core/js/shareitemmodel.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js
index 41f9eb5e0aa..4118a8a0188 100644
--- a/core/js/shareitemmodel.js
+++ b/core/js/shareitemmodel.js
@@ -841,6 +841,20 @@
}
}
return time;
+ },
+
+ /**
+ * Returns a list of share types from the existing shares.
+ *
+ * @return {Array.<int>} array of share types
+ */
+ getShareTypes: function() {
+ var result;
+ result = _.pluck(this.getSharesWithCurrentItem(), 'share_type');
+ if (this.hasLinkShare()) {
+ result.push(OC.Share.SHARE_TYPE_LINK);
+ }
+ return _.uniq(result);
}
});