X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftemplate%2FPostAccessor.java;h=5ff2cf469b36b0a25962a94dc4c18054f79e15e8;hp=99d6845d89f74734b989328c015fa9cf30475c04;hb=a47643aed43d118ca68044f95451bb5374cdb332;hpb=73be50df4f7b7761fe7f286f2fdb73a142c14926 diff --git a/src/main/java/net/pterodactylus/sone/template/PostAccessor.java b/src/main/java/net/pterodactylus/sone/template/PostAccessor.java index 99d6845..5ff2cf4 100644 --- a/src/main/java/net/pterodactylus/sone/template/PostAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/PostAccessor.java @@ -1,5 +1,5 @@ /* - * Sone - PostAccessor.java - Copyright © 2010 David Roden + * Sone - PostAccessor.java - Copyright © 2010–2012 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -56,14 +56,14 @@ public class PostAccessor extends ReflectionAccessor { public Object get(TemplateContext templateContext, Object object, String member) { Post post = (Post) object; if ("replies".equals(member)) { - return Filters.filteredList(core.getReplies(post), Reply.FUTURE_REPLIES_FILTER); + return Filters.filteredList(core.getReplies(post), Reply.FUTURE_REPLY_FILTER); } else if (member.equals("likes")) { return core.getLikes(post); } else if (member.equals("liked")) { Sone currentSone = (Sone) templateContext.get("currentSone"); return (currentSone != null) && (currentSone.isLikedPostId(post.getId())); } else if (member.equals("new")) { - return core.isNewPost(post.getId()); + return !post.isKnown(); } else if (member.equals("bookmarked")) { return core.isBookmarked(post); } else if (member.equals("loaded")) {