aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2015-01-29 13:20:18 +0100
committeriNPUTmice <daniel@gultsch.de>2015-01-29 13:20:18 +0100
commit0eeead495f62b3e04d33c0ad3648c28f56d10e63 (patch)
tree800283a53680d5a14ba0106b71d4e2b241ea70b8 /src/main/java/eu/siacs/conversations/ui
parent3c64839dafcbaaed9ee0f7ef01afe6516f49020b (diff)
properly clear notifications. fixed #921
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index 7aa48c0c..79cc6d12 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -262,8 +262,12 @@ public class ConversationActivity extends XmppActivity
}
public void sendReadMarkerIfNecessary(final Conversation conversation) {
- if (!mActivityPaused && conversation != null && !conversation.isRead()) {
- xmppConnectionService.sendReadMarker(conversation);
+ if (!mActivityPaused && conversation != null) {
+ if (!conversation.isRead()) {
+ xmppConnectionService.sendReadMarker(conversation);
+ } else {
+ xmppConnectionService.markRead(conversation);
+ }
}
}
@@ -742,9 +746,11 @@ public class ConversationActivity extends XmppActivity
if (this.xmppConnectionServiceBound) {
this.xmppConnectionService.getNotificationService().setIsInForeground(true);
}
+
if (!isConversationsOverviewVisable() || !isConversationsOverviewHideable()) {
sendReadMarkerIfNecessary(getSelectedConversation());
}
+
}
@Override