summaryrefslogtreecommitdiffstats
path: root/js/service
diff options
context:
space:
mode:
authorMarco Nassabain <marco.nassabain@hotmail.com>2021-01-26 18:03:42 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 23:17:31 +0200
commite5ccff97a68877fb03641344477dd212e702360f (patch)
tree9a2e61f7dc62f8a31165ee341de2f67156d2e2cd /js/service
parent29a68a10e847f6e6852df308790323f3d9673aef (diff)
✨ Shared menu: get and show sharedCount
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'js/service')
-rw-r--r--js/service/ItemResource.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/service/ItemResource.js b/js/service/ItemResource.js
index fcfd2f28d..e0b19152a 100644
--- a/js/service/ItemResource.js
+++ b/js/service/ItemResource.js
@@ -20,6 +20,7 @@ app.factory('ItemResource', function (Resource, $http, BASE_URL, ITEM_BATCH_SIZE
ItemResource.prototype.clear = function () {
this.starredCount = 0;
+ this.sharedCount = 0;
this.lowestId = 0;
this.highestId = 0;
this.fingerprints = {};
@@ -36,6 +37,10 @@ app.factory('ItemResource', function (Resource, $http, BASE_URL, ITEM_BATCH_SIZE
this.starredCount = value;
break;
+ case 'shared':
+ this.sharedCount = value;
+ break;
+
default:
var self = this;
var importValues = [];
@@ -77,6 +82,11 @@ app.factory('ItemResource', function (Resource, $http, BASE_URL, ITEM_BATCH_SIZE
};
+ ItemResource.prototype.getSharedCount = function () {
+ return this.sharedCount;
+ };
+
+
ItemResource.prototype.star = function (itemId, isStarred) {
if (isStarred === undefined) {
isStarred = true;