aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/parser/PresenceParser.java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-09-04 20:59:35 +0200
committerChristian Schneppe <christian@pix-art.de>2017-09-04 20:59:35 +0200
commit494fb2d3275fe990450c6c1de9a8435dcb317c2f (patch)
tree9afc92be0ccfa1943c8fde0fc953087b6bd1adbc /src/main/java/de/pixart/messenger/parser/PresenceParser.java
parenta558ea31ea2d69e4e6777b6ed56fad1e68de1880 (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.java4
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();