clear avatar cache after nick name change
This commit is contained in:
parent
ff22f93185
commit
ff10b094a0
|
@ -2,6 +2,7 @@ package eu.siacs.conversations.parser;
|
||||||
|
|
||||||
import net.java.otr4j.session.Session;
|
import net.java.otr4j.session.Session;
|
||||||
import net.java.otr4j.session.SessionStatus;
|
import net.java.otr4j.session.SessionStatus;
|
||||||
|
|
||||||
import eu.siacs.conversations.entities.Account;
|
import eu.siacs.conversations.entities.Account;
|
||||||
import eu.siacs.conversations.entities.Contact;
|
import eu.siacs.conversations.entities.Contact;
|
||||||
import eu.siacs.conversations.entities.Conversation;
|
import eu.siacs.conversations.entities.Conversation;
|
||||||
|
@ -374,6 +375,9 @@ public class MessageParser extends AbstractParser implements
|
||||||
Contact contact = account.getRoster().getContact(
|
Contact contact = account.getRoster().getContact(
|
||||||
from);
|
from);
|
||||||
contact.setPresenceName(nick.getContent());
|
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);
|
"show_notification", true);
|
||||||
boolean alwaysNotifyInConference = notify
|
boolean alwaysNotifyInConference = notify
|
||||||
&& mXmppConnectionService.getPreferences().getBoolean(
|
&& mXmppConnectionService.getPreferences().getBoolean(
|
||||||
"always_notify_in_conference", false);
|
"always_notify_in_conference", false);
|
||||||
|
|
||||||
this.parseNick(packet, account);
|
this.parseNick(packet, account);
|
||||||
|
|
||||||
|
@ -414,7 +418,7 @@ public class MessageParser extends AbstractParser implements
|
||||||
}
|
}
|
||||||
} else if (packet.hasChild("body")
|
} else if (packet.hasChild("body")
|
||||||
&& !(packet.hasChild("x",
|
&& !(packet.hasChild("x",
|
||||||
"http://jabber.org/protocol/muc#user"))) {
|
"http://jabber.org/protocol/muc#user"))) {
|
||||||
message = this.parseChat(packet, account);
|
message = this.parseChat(packet, account);
|
||||||
if (message != null) {
|
if (message != null) {
|
||||||
message.markUnread();
|
message.markUnread();
|
||||||
|
@ -442,7 +446,7 @@ public class MessageParser extends AbstractParser implements
|
||||||
message.markUnread();
|
message.markUnread();
|
||||||
notify = alwaysNotifyInConference
|
notify = alwaysNotifyInConference
|
||||||
|| NotificationService
|
|| NotificationService
|
||||||
.wasHighlightedOrPrivate(message);
|
.wasHighlightedOrPrivate(message);
|
||||||
} else {
|
} else {
|
||||||
mXmppConnectionService.markRead(message.getConversation(),
|
mXmppConnectionService.markRead(message.getConversation(),
|
||||||
false);
|
false);
|
||||||
|
@ -481,7 +485,7 @@ public class MessageParser extends AbstractParser implements
|
||||||
if (message.getStatus() == Message.STATUS_RECEIVED
|
if (message.getStatus() == Message.STATUS_RECEIVED
|
||||||
&& conversation.getOtrSession() != null
|
&& conversation.getOtrSession() != null
|
||||||
&& !conversation.getOtrSession().getSessionID().getUserID()
|
&& !conversation.getOtrSession().getSessionID().getUserID()
|
||||||
.equals(message.getPresence())) {
|
.equals(message.getPresence())) {
|
||||||
conversation.endOtrIfNeeded();
|
conversation.endOtrIfNeeded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue