X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FMarkAsKnownPage.java;h=59bcf2ed75460b89f7f35a6eed9173db3b9b7f88;hb=83f434470c6fb4d604c04a69c873d30b5fac5ec9;hp=66ac63530d002fc1465f3125c2374ab436926d1a;hpb=6f019de1d4d9742981d851ac3c9097cca8bff58e;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/MarkAsKnownPage.java b/src/main/java/net/pterodactylus/sone/web/MarkAsKnownPage.java index 66ac635..59bcf2e 100644 --- a/src/main/java/net/pterodactylus/sone/web/MarkAsKnownPage.java +++ b/src/main/java/net/pterodactylus/sone/web/MarkAsKnownPage.java @@ -53,9 +53,6 @@ public class MarkAsKnownPage extends SoneTemplatePage { // SONETEMPLATEPAGE METHODS // - /** - * {@inheritDoc} - */ @Override protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException { super.processTemplate(request, templateContext); @@ -67,17 +64,17 @@ public class MarkAsKnownPage extends SoneTemplatePage { for (StringTokenizer idTokenizer = new StringTokenizer(ids); idTokenizer.hasMoreTokens();) { String id = idTokenizer.nextToken(); if (type.equals("post")) { - Optional post = webInterface.getCore().getPost(id); + Optional post = webInterface.getCore().getDatabase().getPost(id); if (!post.isPresent()) { continue; } webInterface.getCore().markPostKnown(post.get()); } else if (type.equals("reply")) { - Optional reply = webInterface.getCore().getPostReply(id); + Optional reply = webInterface.getCore().getDatabase().getPostReply(id); if (!reply.isPresent()) { continue; } - webInterface.getCore().markReplyKnown(reply.get()); + reply.get().modify().setKnown().update(webInterface.getCore().postReplyUpdated()); } else if (type.equals("sone")) { Optional sone = webInterface.getCore().getSone(id); if (!sone.isPresent()) {