clear muc avatar after going online
This commit is contained in:
parent
e0ec6ad8b6
commit
c5ee541906
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue