X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=ea1cb8330886f2b727894e21da5c6789c360d5fa;hb=72407829d504a0444aadd09cc937bae10b6cb866;hp=f6645ca8bfbb9acb0e7d6b9fb47c5ee8c0118b95;hpb=2f995a29d8731dc3b3d20e78fd9382be542292ff;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index f6645ca..ea1cb83 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -246,7 +246,7 @@ public class WebInterface { public WebInterface(SonePlugin sonePlugin) { this.sonePlugin = sonePlugin; formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword(); - soneTextParser = new SoneTextParser(getCore(), getCore()); + soneTextParser = new SoneTextParser(getCore().getDatabase()); templateContextFactory = new TemplateContextFactory(); templateContextFactory.addAccessor(Object.class, new ReflectionAccessor()); @@ -862,7 +862,7 @@ public class WebInterface { notificationManager.addNotification(mentionNotification); } } else { - getCore().markReplyKnown(reply); + reply.modify().setKnown().update(getCore().postReplyUpdated()); } } @@ -940,7 +940,7 @@ public class WebInterface { localReplyNotification.remove(reply); if (!getMentionedSones(reply.getText()).isEmpty() && reply.getPost().isPresent()) { boolean isMentioned = false; - for (PostReply existingReply : getCore().getReplies(reply.getPostId())) { + for (PostReply existingReply : reply.getPost().transform(Post.TO_REPLIES).get()) { isMentioned |= !reply.isKnown() && !getMentionedSones(existingReply.getText()).isEmpty(); } if (!isMentioned) {