clear muc avatar after going online

This commit is contained in:
Daniel Gultsch 2017-12-18 13:19:11 +01:00
parent e0ec6ad8b6
commit c5ee541906
2 changed files with 6 additions and 2 deletions

View File

@ -553,8 +553,10 @@ public class MucOptions {
this.error = error;
}
public void setOnline() {
public boolean setOnline() {
boolean before = this.isOnline;
this.isOnline = true;
return !before;
}
public ArrayList<User> getUsers() {

View File

@ -70,7 +70,9 @@ public class PresenceParser extends AbstractParser implements
MucOptions.User user = parseItem(conversation, item, from);
if (codes.contains(MucOptions.STATUS_CODE_SELF_PRESENCE)
|| ((codes.isEmpty() || codes.contains(MucOptions.STATUS_CODE_ROOM_CREATED)) && jid.equals(item.getAttributeAsJid("jid")))) {
mucOptions.setOnline();
if (mucOptions.setOnline()) {
mXmppConnectionService.getAvatarService().clear(mucOptions);
}
mucOptions.setSelf(user);
invokeRenameListener(mucOptions, true);
}