From: David ‘Bombe’ Roden Date: Thu, 17 Feb 2011 09:31:16 +0000 (+0100) Subject: Expose whether a post is bookmarked. X-Git-Tag: 0.4.4^2~7^2~8 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=cd128558ea68887dc58e9641ed4307b017c930e4;p=Sone.git Expose whether a post is bookmarked. --- 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); }