From 0eeead495f62b3e04d33c0ad3648c28f56d10e63 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Thu, 29 Jan 2015 13:20:18 +0100 Subject: properly clear notifications. fixed #921 --- .../java/eu/siacs/conversations/ui/ConversationActivity.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3