aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-10-19 23:22:29 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-10-19 23:22:29 +0200
commit53125dbccc31b58dd0655b155ae370469dadd181 (patch)
tree8f5dc59c3c7cab6b242440bb01b07257e45fbff1 /src/main/java
parent9b07059b6e9c85935031ffc03e5e6d00a9376d57 (diff)
move chat state reset from background switch to foreground switch to account for chat states sent in the mean time
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java6
1 files 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");
}