Always show your own avatar.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 7 Dec 2011 15:13:55 +0000 (16:13 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 7 Dec 2011 15:13:55 +0000 (16:13 +0100)
src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java

index 97972c7..f6056fa 100644 (file)
@@ -60,6 +60,10 @@ public class ProfileAccessor extends ReflectionAccessor {
                                /* not logged in? don’t show custom avatars, then. */
                                return null;
                        }
+                       if (profile.getSone().equals(currentSone)) {
+                               /* always show your own avatar. */
+                               return profile.getAvatar();
+                       }
                        ShowCustomAvatars showCustomAvatars = currentSone.getOptions().<ShowCustomAvatars> getEnumOption("ShowCustomAvatars").get();
                        if (showCustomAvatars == ShowCustomAvatars.NEVER) {
                                return null;