properly clear notifications. fixed #921

iNPUTmice created

Change summary

src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 10 
1 file changed, 8 insertions(+), 2 deletions(-)

Detailed changes

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