diff options
author | Marco Nassabain <marco.nassabain@hotmail.com> | 2021-03-14 21:55:33 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 23:17:31 +0200 |
commit | a86f78a0a7d034f6b5c19ddfaee2a462c48837d2 (patch) | |
tree | 197f6e1d0d0c1f16f814c0b662b2fc494eed6a25 | |
parent | 1da543a70209577a6c68c6bfa5ea0d4448831fc0 (diff) |
🔀 Fix last broken merge
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
-rw-r--r-- | js/controller/ShareController.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/controller/ShareController.js b/js/controller/ShareController.js index 94d60daf6..23b8c525e 100644 --- a/js/controller/ShareController.js +++ b/js/controller/ShareController.js @@ -102,6 +102,22 @@ app.controller('ShareController', function (ShareResource, Loading) { }); }; + this.isLoading = function(userId) { + return Loading.isLoading(userId); + }; + + this.isStatus = function(itemId, userId, status) { + let item = this.usersSharedArticles.find(i => i.id === itemId); + if (!item) { + return false; + } + let user = item.users.find(u => u.id === userId); + if (!user) { + return false; + } + return user.status === status; + }; + this.getFacebookUrl = function(url){ return 'https://www.facebook.com/sharer/sharer.php?u='+url; }; |