Expose whether a post is bookmarked.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 17 Feb 2011 09:31:16 +0000 (10:31 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 17 Feb 2011 09:31:16 +0000 (10:31 +0100)
src/main/java/net/pterodactylus/sone/template/PostAccessor.java

index f6a9c06..584cb72 100644 (file)
@@ -62,6 +62,8 @@ public class PostAccessor extends ReflectionAccessor {
                        return (currentSone != null) && (currentSone.isLikedPostId(post.getId()));
                } else if (member.equals("new")) {
                        return core.isNewPost(post.getId());
+               } else if (member.equals("bookmarked")) {
+                       return core.isBookmarked(post);
                }
                return super.get(templateContext, object, member);
        }