Don’t get trust values if it’s irrelevant.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 21 Dec 2011 12:37:23 +0000 (13:37 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 21 Dec 2011 12:37:23 +0000 (13:37 +0100)
src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java

index 36fa42d..05857cf 100644 (file)
@@ -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) {