use faster query for 'all unread'

This commit is contained in:
Athou
2013-07-19 12:18:10 +02:00
parent 079a73c92e
commit 074ab9f707
3 changed files with 37 additions and 11 deletions

View File

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