return count only (fixes #18)

This commit is contained in:
Athou
2013-04-06 17:21:48 +02:00
parent 4cb77f5a73
commit 56443490b7
4 changed files with 16 additions and 6 deletions

View File

@@ -206,9 +206,8 @@ public class SubscriptionsREST extends AbstractREST {
sub.setName(subscription.getTitle());
sub.setMessage(subscription.getFeed().getMessage());
sub.setFeedUrl(subscription.getFeed().getLink());
// TODO use count instead of retrieving everything here
int size = feedEntryService.getEntries(subscription.getFeed(),
getUser(), true).size();
long size = feedEntryService.getUnreadCount(
subscription.getFeed(), getUser());
sub.setUnread(size);
category.getFeeds().add(sub);
}