only notify ui on significant muc changes

This commit is contained in:
iNPUTmice 2014-08-13 11:21:33 +02:00
parent 07e6873025
commit a4faa158c0
1 changed files with 8 additions and 1 deletions

View File

@ -24,17 +24,24 @@ public class PresenceParser extends AbstractParser implements
Conversation muc = mXmppConnectionService.find(account, packet
.getAttribute("from").split("/")[0]);
if (muc != null) {
boolean before = muc.getMucOptions().online();
muc.getMucOptions().processPacket(packet, mPgpEngine);
if (before!=muc.getMucOptions().online()) {
mXmppConnectionService.updateConversationUi();
}
}
} else if (packet.hasChild("x", "http://jabber.org/protocol/muc")) {
Conversation muc = mXmppConnectionService.find(account, packet
.getAttribute("from").split("/")[0]);
if (muc != null) {
boolean before = muc.getMucOptions().online();
muc.getMucOptions().processPacket(packet, mPgpEngine);
}
}
if (before!=muc.getMucOptions().online()) {
mXmppConnectionService.updateConversationUi();
}
}
}
}
public void parseContactPresence(PresencePacket packet, Account account) {
PresenceGenerator mPresenceGenerator = mXmppConnectionService