only notify ui on significant muc changes
This commit is contained in:
parent
07e6873025
commit
a4faa158c0
|
@ -24,16 +24,23 @@ public class PresenceParser extends AbstractParser implements
|
||||||
Conversation muc = mXmppConnectionService.find(account, packet
|
Conversation muc = mXmppConnectionService.find(account, packet
|
||||||
.getAttribute("from").split("/")[0]);
|
.getAttribute("from").split("/")[0]);
|
||||||
if (muc != null) {
|
if (muc != null) {
|
||||||
|
boolean before = muc.getMucOptions().online();
|
||||||
muc.getMucOptions().processPacket(packet, mPgpEngine);
|
muc.getMucOptions().processPacket(packet, mPgpEngine);
|
||||||
|
if (before!=muc.getMucOptions().online()) {
|
||||||
|
mXmppConnectionService.updateConversationUi();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (packet.hasChild("x", "http://jabber.org/protocol/muc")) {
|
} else if (packet.hasChild("x", "http://jabber.org/protocol/muc")) {
|
||||||
Conversation muc = mXmppConnectionService.find(account, packet
|
Conversation muc = mXmppConnectionService.find(account, packet
|
||||||
.getAttribute("from").split("/")[0]);
|
.getAttribute("from").split("/")[0]);
|
||||||
if (muc != null) {
|
if (muc != null) {
|
||||||
|
boolean before = muc.getMucOptions().online();
|
||||||
muc.getMucOptions().processPacket(packet, mPgpEngine);
|
muc.getMucOptions().processPacket(packet, mPgpEngine);
|
||||||
|
if (before!=muc.getMucOptions().online()) {
|
||||||
|
mXmppConnectionService.updateConversationUi();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mXmppConnectionService.updateConversationUi();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void parseContactPresence(PresencePacket packet, Account account) {
|
public void parseContactPresence(PresencePacket packet, Account account) {
|
||||||
|
|
Loading…
Reference in a new issue