X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FViewSonePage.java;h=5e07980a447daab6e904651433b988833a49a733;hb=f10d40f746f6c7c716f783da11791d28c1117447;hp=3c0ba8fa7c883920025b826ca625227e53d34ee6;hpb=cb7aebca2a351028dd4fdd00dcd637c6aafac79b;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java b/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java index 3c0ba8f..5e07980 100644 --- a/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java @@ -83,7 +83,7 @@ public class ViewSonePage extends SoneTemplatePage { return; } List sonePosts = sone.get().getPosts(); - sonePosts.addAll(webInterface.getCore().getDirectedPosts(sone.get().getId())); + sonePosts.addAll(webInterface.getCore().getDatabase().getDirectedPosts(sone.get().getId())); Collections.sort(sonePosts, Post.TIME_COMPARATOR); Pagination postPagination = new Pagination(sonePosts, webInterface.getCore().getPreferences().getPostsPerPage()).setPage(Numbers.safeParseInteger(request.getHttpRequest().getParam("postPage"), 0)); templateContext.set("postPagination", postPagination); @@ -95,7 +95,7 @@ public class ViewSonePage extends SoneTemplatePage { if (!post.isPresent() || repliedPosts.containsKey(post.get()) || sone.get().equals(post.get().getSone()) || (sone.get().getId().equals(post.get().getRecipientId().orNull()))) { continue; } - repliedPosts.put(post.get(), webInterface.getCore().getReplies(post.get().getId())); + repliedPosts.put(post.get(), post.get().getReplies()); } List posts = new ArrayList(repliedPosts.keySet()); Collections.sort(posts, new Comparator() {