aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-11-04 18:27:20 +0100
committeriNPUTmice <daniel@gultsch.de>2014-11-04 18:27:20 +0100
commitff10b094a0a210bb1c7745bd0e0f92e9a7e3ec2d (patch)
tree57fbadc48421079fdfca417e1c7c44452abba894 /src/main
parentff22f93185264f2153b5a5cd48538d752849b668 (diff)
clear avatar cache after nick name change
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index 383ac89a..5b22ad61 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -2,6 +2,7 @@ package eu.siacs.conversations.parser;
import net.java.otr4j.session.Session;
import net.java.otr4j.session.SessionStatus;
+
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.entities.Conversation;
@@ -374,6 +375,9 @@ public class MessageParser extends AbstractParser implements
Contact contact = account.getRoster().getContact(
from);
contact.setPresenceName(nick.getContent());
+ mXmppConnectionService.getAvatarService().clear(account);
+ mXmppConnectionService.updateConversationUi();
+ mXmppConnectionService.updateAccountUi();
}
}
}
@@ -401,7 +405,7 @@ public class MessageParser extends AbstractParser implements
"show_notification", true);
boolean alwaysNotifyInConference = notify
&& mXmppConnectionService.getPreferences().getBoolean(
- "always_notify_in_conference", false);
+ "always_notify_in_conference", false);
this.parseNick(packet, account);
@@ -414,7 +418,7 @@ public class MessageParser extends AbstractParser implements
}
} else if (packet.hasChild("body")
&& !(packet.hasChild("x",
- "http://jabber.org/protocol/muc#user"))) {
+ "http://jabber.org/protocol/muc#user"))) {
message = this.parseChat(packet, account);
if (message != null) {
message.markUnread();
@@ -442,7 +446,7 @@ public class MessageParser extends AbstractParser implements
message.markUnread();
notify = alwaysNotifyInConference
|| NotificationService
- .wasHighlightedOrPrivate(message);
+ .wasHighlightedOrPrivate(message);
} else {
mXmppConnectionService.markRead(message.getConversation(),
false);
@@ -481,7 +485,7 @@ public class MessageParser extends AbstractParser implements
if (message.getStatus() == Message.STATUS_RECEIVED
&& conversation.getOtrSession() != null
&& !conversation.getOtrSession().getSessionID().getUserID()
- .equals(message.getPresence())) {
+ .equals(message.getPresence())) {
conversation.endOtrIfNeeded();
}