mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
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:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user