From 53125dbccc31b58dd0655b155ae370469dadd181 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 19 Oct 2015 23:22:29 +0200 Subject: move chat state reset from background switch to foreground switch to account for chat states sent in the mean time --- .../java/eu/siacs/conversations/services/XmppConnectionService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index dff133d6..ba74280d 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -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"); } -- cgit v1.2.3