server now returns wether the 'unread only' flag was ignored while generating the response (fix scrolling for results in a feed search)

This commit is contained in:
Athou
2014-03-06 15:46:19 +01:00
parent 65d6f8616b
commit 0899e0b0bf
4 changed files with 10 additions and 2 deletions

View File

@@ -41,4 +41,7 @@ public class Entries implements Serializable {
@ApiProperty("list of entries")
private List<Entry> entries = Lists.newArrayList();
@ApiProperty("true if the unread flag was ignored in the request, all entries are returned regardless of their read status")
private boolean ignoredReadStatus;
}

View File

@@ -183,6 +183,7 @@ public class CategoryREST extends AbstractREST {
}
entries.setTimestamp(System.currentTimeMillis());
entries.setIgnoredReadStatus(keywords != null || tag != null);
FeedUtils.removeUnwantedFromSearch(entries.getEntries(), keywords);
return Response.ok(entries).build();
}

View File

@@ -187,6 +187,7 @@ public class FeedREST extends AbstractREST {
}
entries.setTimestamp(System.currentTimeMillis());
entries.setIgnoredReadStatus(keywords != null);
FeedUtils.removeUnwantedFromSearch(entries.getEntries(), keywords);
return Response.ok(entries).build();
}