update ui when new avatar was found

This commit is contained in:
iNPUTmice 2014-10-21 15:26:17 +02:00
parent 0d767c3971
commit a56ee63a3e
2 changed files with 8 additions and 0 deletions

View File

@ -350,12 +350,16 @@ public class MessageParser extends AbstractParser implements
} }
mXmppConnectionService.getAvatarService().clear( mXmppConnectionService.getAvatarService().clear(
account); account);
mXmppConnectionService.updateConversationUi();
mXmppConnectionService.updateAccountUi();
} else { } else {
Contact contact = account.getRoster().getContact( Contact contact = account.getRoster().getContact(
from); from);
contact.setAvatar(avatar.getFilename()); contact.setAvatar(avatar.getFilename());
mXmppConnectionService.getAvatarService().clear( mXmppConnectionService.getAvatarService().clear(
contact); contact);
mXmppConnectionService.updateConversationUi();
mXmppConnectionService.updateRosterUi();
} }
} else { } else {
mXmppConnectionService.fetchAvatar(account, avatar); mXmppConnectionService.fetchAvatar(account, avatar);

View File

@ -1510,11 +1510,15 @@ public class XmppConnectionService extends Service {
databaseBackend.updateAccount(account); databaseBackend.updateAccount(account);
} }
getAvatarService().clear(account); getAvatarService().clear(account);
updateConversationUi();
updateAccountUi();
} else { } else {
Contact contact = account.getRoster() Contact contact = account.getRoster()
.getContact(avatar.owner); .getContact(avatar.owner);
contact.setAvatar(avatar.getFilename()); contact.setAvatar(avatar.getFilename());
getAvatarService().clear(contact); getAvatarService().clear(contact);
updateConversationUi();
updateRosterUi();
} }
if (callback != null) { if (callback != null) {
callback.success(avatar); callback.success(avatar);