aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-03-29 23:18:09 +0200
committerChristian Schneppe <christian@pix-art.de>2018-03-29 23:18:09 +0200
commitd06e09b9573179db2dce897ea310e80c26940dda (patch)
treeadfc7539f6f6bb1e8219d79e3016db188e1b9f4c /src/main/java/de
parent0407f5960c846c19715f3716096769663b3ab919 (diff)
register open conversation with notification service
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationActivity.java1
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
index 199f98b16..458fb4bf4 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
@@ -102,6 +102,7 @@ public class ConversationActivity extends XmppActivity implements OnConversation
notifyFragmentOfBackendConnected(id);
}
invalidateActionBarTitle();
+ xmppConnectionService.getNotificationService().setIsInForeground(true);
Intent intent = pendingViewIntent.pop();
if (intent != null) {
if (processViewIntent(intent)) {
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index 84af05329..7e9fb1aec 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -1815,6 +1815,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
this.activity.xmppConnectionService.updateConversation(this.conversation);
}
updateChatState(this.conversation, msg);
+ this.activity.xmppConnectionService.getNotificationService().setOpenConversation(null);
}
}
@@ -1899,6 +1900,8 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
}
if (activity != null) {
activity.onConversationRead(this.conversation);
+ //TODO if we only do this when this fragment is running on main it won't *bing* in tablet layout which might be unnecessary since we can *see* it
+ activity.xmppConnectionService.getNotificationService().setOpenConversation(this.conversation);
}
}