clear notification and activate grace period when receiving chat marker from another instance
This commit is contained in:
parent
89edd83609
commit
e6af502055
|
@ -40,6 +40,10 @@ public class MessageParser extends AbstractParser implements
|
||||||
Jid from = packet.getFrom();
|
Jid from = packet.getFrom();
|
||||||
if (from.toBareJid().equals(account.getJid().toBareJid())) {
|
if (from.toBareJid().equals(account.getJid().toBareJid())) {
|
||||||
conversation.setOutgoingChatState(state);
|
conversation.setOutgoingChatState(state);
|
||||||
|
if (state == ChatState.ACTIVE || state == ChatState.COMPOSING) {
|
||||||
|
mXmppConnectionService.markRead(conversation);
|
||||||
|
account.activateGracePeriod();
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return conversation.setIncomingChatState(state);
|
return conversation.setIncomingChatState(state);
|
||||||
|
@ -300,7 +304,7 @@ public class MessageParser extends AbstractParser implements
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extractChatState(mXmppConnectionService.find(account, from), packet)) {
|
if (extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), packet)) {
|
||||||
mXmppConnectionService.updateConversationUi();
|
mXmppConnectionService.updateConversationUi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue