persist read status instead of unread status

This commit is contained in:
Athou
2013-07-22 16:31:29 +02:00
parent e9cc6fd518
commit 074ecbf159
9 changed files with 160 additions and 268 deletions

View File

@@ -54,8 +54,9 @@ public class NextUnreadRedirectPage extends WebPage {
List<FeedEntryStatus> statuses = null;
if (StringUtils.isBlank(categoryId)
|| CategoryREST.ALL.equals(categoryId)) {
statuses = feedEntryStatusDAO.findAllUnread(user, null, 0, 1,
order, true);
List<FeedSubscription> subs = feedSubscriptionDAO.findAll(user);
statuses = feedEntryStatusDAO.findBySubscriptions(subs, true, null,
null, 0, 1, order, true);
} else {
FeedCategory category = feedCategoryDAO.findById(user,
Long.valueOf(categoryId));
@@ -64,8 +65,8 @@ public class NextUnreadRedirectPage extends WebPage {
.findAllChildrenCategories(user, category);
List<FeedSubscription> subscriptions = feedSubscriptionDAO
.findByCategories(user, children);
statuses = feedEntryStatusDAO.findUnreadBySubscriptions(
subscriptions, null, 0, 1, order, true);
statuses = feedEntryStatusDAO.findBySubscriptions(
subscriptions, true, null, null, 0, 1, order, true);
}
}