From: David ‘Bombe’ Roden Date: Tue, 19 Oct 2010 06:40:39 +0000 (+0200) Subject: Rename “isFriend” property to just “friend”. X-Git-Tag: 0.1-RC1~205 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=1c57e8be327fe76dbc82ba438bcaeb4023259e71 Rename “isFriend” property to just “friend”. --- diff --git a/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java b/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java index 97cf327..54a5a86 100644 --- a/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java @@ -29,7 +29,7 @@ import net.pterodactylus.util.template.ReflectionAccessor; *
niceName
*
Will show a combination of first name, middle name, and last name, if * available, otherwise the username of the Sone is returned.
- *
isFriend
+ *
friend
*
Will return {@code true} if the sone in question is a friend of the * currently logged in Sone (as determined by accessing the “currentSone” * variable of the given {@link DataProvider}).
@@ -50,7 +50,7 @@ public class SoneAccessor extends ReflectionAccessor { Sone sone = (Sone) object; if (member.equals("niceName")) { return getNiceName(sone); - } else if (member.equals("isFriend")) { + } else if (member.equals("friend")) { Sone currentSone = (Sone) dataProvider.getData("currentSone"); return currentSone.hasFriend(sone) ? true : null; } else if (member.equals("isCurrent")) { diff --git a/src/main/resources/templates/include/viewSone.html b/src/main/resources/templates/include/viewSone.html index 57ab384..c75119a 100644 --- a/src/main/resources/templates/include/viewSone.html +++ b/src/main/resources/templates/include/viewSone.html @@ -3,7 +3,7 @@
(<%= View.Sone.Label.LastUpdate|l10n|html> <% sone.time|date format="MMM d, yyyy, HH:mm:ss">)
<%ifnull ! currentSone> <%if ! sone.isCurrent> - <%if sone.isFriend> + <%if sone.friend>
diff --git a/src/main/resources/templates/viewSone.html b/src/main/resources/templates/viewSone.html index 7b0647f..84c9c51 100644 --- a/src/main/resources/templates/viewSone.html +++ b/src/main/resources/templates/viewSone.html @@ -13,7 +13,7 @@

<%= Page.ViewSone.PostList.Title|l10n|insert needle="{sone}" key=sone.niceName|html>

<%if ! sone.isCurrent> - <%if sone.isFriend> + <%if sone.friend>
<%= Page.ViewSone.UnfollowSone.Text|l10n|html>
<%else>
<%= Page.ViewSone.FollowSone.Text|l10n|html>