move chat state reset from background switch to foreground switch to account for chat states sent in the mean time
This commit is contained in:
parent
9b07059b6e
commit
53125dbccc
|
@ -1636,6 +1636,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
|
|||
}
|
||||
|
||||
private void switchToForeground() {
|
||||
for (Conversation conversation : getConversations()) {
|
||||
conversation.setIncomingChatState(ChatState.ACTIVE);
|
||||
}
|
||||
for (Account account : getAccounts()) {
|
||||
if (account.getStatus() == Account.State.ONLINE) {
|
||||
XmppConnection connection = account.getXmppConnection();
|
||||
|
@ -1656,9 +1659,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
|
|||
}
|
||||
}
|
||||
}
|
||||
for (Conversation conversation : getConversations()) {
|
||||
conversation.setIncomingChatState(ChatState.ACTIVE);
|
||||
}
|
||||
this.mNotificationService.setIsInForeground(false);
|
||||
Log.d(Config.LOGTAG, "app switched into background");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue