- Collections.sort(allPosts, Post.TIME_COMPARATOR);
- template.set("posts", allPosts);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void postProcess(Request request, Template template) {
- @SuppressWarnings("unchecked")
- List<Post> posts = (List<Post>) template.get("posts");
- for (Post post : posts) {
- webInterface.getCore().markPostKnown(post);
- for (Reply reply : webInterface.getCore().getReplies(post)) {
- webInterface.getCore().markReplyKnown(reply);
+ for (Sone sone : webInterface.getCore().getSones()) {
+ for (Post post : sone.getPosts()) {
+ if (currentSone.equals(post.getRecipient().orNull()) && !allPosts.contains(post)) {
+ allPosts.add(post);
+ }