aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2017-11-21 16:17:27 +0100
committerDaniel Gultsch <daniel@gultsch.de>2017-11-21 16:17:27 +0100
commit4596cad3cb99cf319ba721165623a52d832604f0 (patch)
treeb881d86ba6fb17969abdf1f1cd309e955adc4882
parent381fe82b01a38f7bbfd39c2c991af950839fe2b4 (diff)
MessageParser: don't refresh view after parsing chat state when combined with message
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index 606fbff..454cca7 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -415,10 +415,6 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
return;
}
- if (query == null && extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), isTypeGroupChat, packet)) {
- mXmppConnectionService.updateConversationUi();
- }
-
if ((body != null || pgpEncrypted != null || axolotlEncrypted != null || oobUrl != null) && !isMucStatusMessage) {
final Conversation conversation = mXmppConnectionService.findOrCreateConversation(account, counterpart.toBareJid(), isTypeGroupChat, false, query, false);
final boolean conversationMultiMode = conversation.getMode() == Conversation.MODE_MULTI;
@@ -471,6 +467,9 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
}
message = parseAxolotlChat(axolotlEncrypted, origin, conversation, status);
if (message == null) {
+ if (query == null && extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), isTypeGroupChat, packet)) {
+ mXmppConnectionService.updateConversationUi();
+ }
return;
}
if (conversationMultiMode) {
@@ -543,6 +542,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
if (replacedMessage.getStatus() == Message.STATUS_RECEIVED) {
replacedMessage.markUnread();
}
+ extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), isTypeGroupChat, packet);
mXmppConnectionService.updateMessage(replacedMessage, uuid);
mXmppConnectionService.getNotificationService().updateNotification(false);
if (mXmppConnectionService.confirmMessages()
@@ -604,6 +604,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
}
if (query == null) {
+ extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), isTypeGroupChat, packet);
mXmppConnectionService.updateConversationUi();
}
@@ -634,6 +635,11 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
}
}
} else if (!packet.hasChild("body")) { //no body
+
+ if (query == null && extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), isTypeGroupChat, packet)) {
+ mXmppConnectionService.updateConversationUi();
+ }
+
final Conversation conversation = mXmppConnectionService.find(account, from.toBareJid());
if (isTypeGroupChat) {
if (packet.hasChild("subject")) {