Update utils to more recent version, adapt to new packages, fix bug listing deleted...
[Sone.git] / src / main / java / net / pterodactylus / sone / template / PostAccessor.java
index bef94d6..d05b074 100644 (file)
@@ -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
@@ -21,7 +21,7 @@ import net.pterodactylus.sone.core.Core;
 import net.pterodactylus.sone.data.Post;
 import net.pterodactylus.sone.data.Reply;
 import net.pterodactylus.sone.data.Sone;
-import net.pterodactylus.util.filter.Filters;
+import net.pterodactylus.util.collection.filter.Filters;
 import net.pterodactylus.util.template.ReflectionAccessor;
 import net.pterodactylus.util.template.TemplateContext;
 
@@ -63,7 +63,7 @@ public class PostAccessor extends ReflectionAccessor {
                        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")) {