diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-09-04 20:59:35 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-09-04 20:59:35 +0200 |
commit | 494fb2d3275fe990450c6c1de9a8435dcb317c2f (patch) | |
tree | 9afc92be0ccfa1943c8fde0fc953087b6bd1adbc /src/main/java/de/pixart/messenger/parser/PresenceParser.java | |
parent | a558ea31ea2d69e4e6777b6ed56fad1e68de1880 (diff) |
made avatar cache cleaning more efficent after name changes
Diffstat (limited to 'src/main/java/de/pixart/messenger/parser/PresenceParser.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/PresenceParser.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/PresenceParser.java b/src/main/java/de/pixart/messenger/parser/PresenceParser.java index 37efcdc8b..0ade1abc3 100644 --- a/src/main/java/de/pixart/messenger/parser/PresenceParser.java +++ b/src/main/java/de/pixart/messenger/parser/PresenceParser.java @@ -185,7 +185,9 @@ public class PresenceParser extends AbstractParser implements final Contact contact = account.getRoster().getContact(from); if (type == null) { final String resource = from.isBareJid() ? "" : from.getResourcepart(); - contact.setPresenceName(packet.findChildContent("nick", "http://jabber.org/protocol/nick")); + if (contact.setPresenceName(packet.findChildContent("nick", Namespace.NICK))) { + mXmppConnectionService.getAvatarService().clear(contact); + } Avatar avatar = Avatar.parsePresence(packet.findChild("x", "vcard-temp:x:update")); if (avatar != null && (!contact.isSelf() || account.getAvatar() == null)) { avatar.owner = from.toBareJid(); |