Add all posts that have the current Sone as recipient.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 30 Dec 2010 20:38:26 +0000 (21:38 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 30 Dec 2010 20:38:26 +0000 (21:38 +0100)
src/main/java/net/pterodactylus/sone/web/IndexPage.java

index 2d61cf3..a33072f 100644 (file)
@@ -63,6 +63,13 @@ public class IndexPage extends SoneTemplatePage {
                        }
                        allPosts.addAll(webInterface.getCore().getSone(friendSoneId).getPosts());
                }
+               for (Sone sone : webInterface.getCore().getSones()) {
+                       for (Post post : sone.getPosts()) {
+                               if (currentSone.equals(post.getRecipient()) && !allPosts.contains(post)) {
+                                       allPosts.add(post);
+                               }
+                       }
+               }
                Collections.sort(allPosts, Post.TIME_COMPARATOR);
                template.set("posts", allPosts);
        }