Don’t get trust values if it’s irrelevant.
[Sone.git] / 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) {