posts.addAll(sone.getPosts());
}
@SuppressWarnings("synthetic-access")
- Set<Hit<Post>> postHits = getHits(posts, phrases, new PostStringGenerator());
+ Set<Hit<Post>> postHits = getHits(Filters.filteredSet(posts, Post.FUTURE_POSTS_FILTER), phrases, new PostStringGenerator());
/* now filter. */
soneHits = Filters.filteredSet(soneHits, Hit.POSITIVE_FILTER);
templateContext.set("soneHits", sonePagination.getItems());
templateContext.set("postPagination", postPagination);
templateContext.set("postHits", postPagination.getItems());
-
- /* mark found posts and Sones as knew. */
- for (Sone sone : sonePagination.getItems()) {
- webInterface.getCore().markSoneKnown(sone);
- }
- for (Post post : postPagination.getItems()) {
- webInterface.getCore().markPostKnown(post);
- for (Reply reply : webInterface.getCore().getReplies(post)) {
- webInterface.getCore().markReplyKnown(reply);
- }
- }
}
//
if (post.getRecipient() != null) {
postString.append(' ').append(SoneStringGenerator.NAME_GENERATOR.generateString(post.getRecipient()));
}
- for (Reply reply : webInterface.getCore().getReplies(post)) {
+ for (Reply reply : Filters.filteredList(webInterface.getCore().getReplies(post), Reply.FUTURE_REPLIES_FILTER)) {
postString.append(' ').append(SoneStringGenerator.NAME_GENERATOR.generateString(reply.getSone()));
postString.append(' ').append(reply.getText());
}