X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FViewSonePage.java;h=5e07980a447daab6e904651433b988833a49a733;hb=2e03e9dddbea4b81aacaf1aa316f5c3ccffd4bf9;hp=e120e926302cd3bd96e1818eb20574017f17469e;hpb=45803a1c678d6811f7bbf85d50c79844031be0f0;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 e120e92..5e07980 100644 --- a/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java @@ -61,9 +61,6 @@ public class ViewSonePage extends SoneTemplatePage { // TEMPLATEPAGE METHODS // - /** - * {@inheritDoc} - */ @Override protected String getPageTitle(FreenetRequest request) { String soneId = request.getHttpRequest().getParam("sone"); @@ -75,9 +72,6 @@ public class ViewSonePage extends SoneTemplatePage { return webInterface.getL10n().getString("Page.ViewSone.Page.TitleWithoutSone"); } - /** - * {@inheritDoc} - */ @Override protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException { super.processTemplate(request, templateContext); @@ -89,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); @@ -101,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())); + repliedPosts.put(post.get(), post.get().getReplies()); } List posts = new ArrayList(repliedPosts.keySet()); Collections.sort(posts, new Comparator() { @@ -118,9 +112,6 @@ public class ViewSonePage extends SoneTemplatePage { templateContext.set("repliedPosts", repliedPostPagination.getItems()); } - /** - * {@inheritDoc} - */ @Override public boolean isLinkExcepted(URI link) { return true;