From cd128558ea68887dc58e9641ed4307b017c930e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 17 Feb 2011 10:31:16 +0100 Subject: [PATCH] Expose whether a post is bookmarked. --- src/main/java/net/pterodactylus/sone/template/PostAccessor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/template/PostAccessor.java b/src/main/java/net/pterodactylus/sone/template/PostAccessor.java index f6a9c06..584cb72 100644 --- a/src/main/java/net/pterodactylus/sone/template/PostAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/PostAccessor.java @@ -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); } -- 2.7.4