aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-08-13 11:21:33 +0200
committeriNPUTmice <daniel@gultsch.de>2014-08-13 11:21:33 +0200
commita4faa158c0c8f92f9f430c8daa931f16b4f2a58d (patch)
tree98614df82ccca52831e8ff24d4dcaecac2618aa7
parent07e6873025a29df6ab3d9597c9f0457616add55a (diff)
only notify ui on significant muc changes
-rw-r--r--src/eu/siacs/conversations/parser/PresenceParser.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/parser/PresenceParser.java b/src/eu/siacs/conversations/parser/PresenceParser.java
index 3582653f..ea19df6f 100644
--- a/src/eu/siacs/conversations/parser/PresenceParser.java
+++ b/src/eu/siacs/conversations/parser/PresenceParser.java
@@ -24,16 +24,23 @@ 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();
+ }
}
}
- mXmppConnectionService.updateConversationUi();
}
public void parseContactPresence(PresencePacket packet, Account account) {