summaryrefslogtreecommitdiffstats
path: root/js/controller
diff options
context:
space:
mode:
authorMarco Nassabain <marco.nassabain@hotmail.com>2021-03-07 00:23:38 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 23:17:31 +0200
commit04cf2672c3a06dbaa7792403237e3ec9bbaf5455 (patch)
tree910b406b0371bfceb6cdcb729166f90acb49a6a9 /js/controller
parent088ebcc63a892f2245c863c647516c0dd8041de7 (diff)
🎨 Adapt front-end to match new implementation
- remove share-specific code since new solution uses dummy feeds Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'js/controller')
-rw-r--r--js/controller/ContentController.js17
-rw-r--r--js/controller/NavigationController.js13
2 files changed, 4 insertions, 26 deletions
diff --git a/js/controller/ContentController.js b/js/controller/ContentController.js
index b0478f0c4..15459c01b 100644
--- a/js/controller/ContentController.js
+++ b/js/controller/ContentController.js
@@ -90,10 +90,7 @@ app.controller('ContentController', function (Publisher, FeedResource, ItemResou
if (!item.keepUnread && item.unread === true) {
ItemResource.markItemRead(itemId);
- if (item.isShared === false) {
- // feeds containing shared items aren't in our cache
- FeedResource.markItemOfFeedRead(item.feedId);
- }
+ FeedResource.markItemOfFeedRead(item.feedId);
}
};
@@ -105,10 +102,7 @@ app.controller('ContentController', function (Publisher, FeedResource, ItemResou
var item = ItemResource.get(itemId);
if (!item.unread) {
ItemResource.markItemRead(itemId, false);
- if (item.isShared === false) {
- // feeds containing shared items aren't in our cache
- FeedResource.markItemOfFeedUnread(item.feedId);
- }
+ FeedResource.markItemOfFeedUnread(item.feedId);
}
item.keepUnread = !item.keepUnread;
@@ -143,11 +137,8 @@ app.controller('ContentController', function (Publisher, FeedResource, ItemResou
itemIds.forEach(function (itemId) {
var item = ItemResource.get(itemId);
if (!item.keepUnread) {
- if (item.isShared === false) {
- // feeds containing shared items aren't in our cache
- ids.push(itemId);
- feedIds.push(item.feedId);
- }
+ ids.push(itemId);
+ feedIds.push(item.feedId);
}
});
diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js
index ec86ff01a..68a46900e 100644
--- a/js/controller/NavigationController.js
+++ b/js/controller/NavigationController.js
@@ -113,14 +113,6 @@ app.controller('NavigationController', function ($route, FEED_TYPE, FeedResource
return this.getStarredCount() > 0;
};
- this.getSharedCount = function () {
- return ItemResource.getSharedCount();
- };
-
- this.isSharedUnread = function () {
- return this.getSharedCount() > 0;
- };
-
this.toggleFolder = function (folderName) {
FolderResource.toggleOpen(folderName);
};
@@ -158,11 +150,6 @@ app.controller('NavigationController', function ($route, FEED_TYPE, FeedResource
$route.current.$$route.type === FEED_TYPE.STARRED;
};
- this.isSharedActive = function () {
- return $route.current &&
- $route.current.$$route.type === FEED_TYPE.SHARED;
- };
-
this.isExploreActive = function () {
return $route.current &&
$route.current.$$route.type === FEED_TYPE.EXPLORE;