From: David ‘Bombe’ Roden Date: Wed, 21 Dec 2011 12:37:23 +0000 (+0100) Subject: Don’t get trust values if it’s irrelevant. X-Git-Tag: 0.8^2~40 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5d4c3c06473b17a7479129a9538c3917dc98890f;p=Sone.git Don’t get trust values if it’s irrelevant. --- diff --git a/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java b/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java index 36fa42d..05857cf 100644 --- a/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java @@ -79,8 +79,8 @@ public class ProfileAccessor extends ReflectionAccessor { if ((showCustomAvatars == ShowCustomAvatars.ALWAYS) || (avatarId == null)) { return avatarId; } - if ((showCustomAvatars == ShowCustomAvatars.FOLLOWED) && currentSone.hasFriend(remoteSone.getId())) { - return avatarId; + if (showCustomAvatars == ShowCustomAvatars.FOLLOWED) { + return currentSone.hasFriend(remoteSone.getId()) ? avatarId : null; } Trust trust = core.getTrust(currentSone, remoteSone); if (trust == null) {