From dc8b467cf63af3466e13f58c8abc63875a44754e Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Thu, 15 Jan 2015 16:32:24 +0100 Subject: sending read marker when resuming activity and conversation is open --- src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/eu/siacs/conversations') diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 7fac95c5..4ba6c773 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -261,7 +261,7 @@ public class ConversationActivity extends XmppActivity } public void sendReadMarkerIfNecessary(final Conversation conversation) { - if (!mActivityPaused && !conversation.isRead()) { + if (!mActivityPaused && conversation != null && !conversation.isRead()) { xmppConnectionService.sendReadMarker(conversation); } } @@ -761,6 +761,9 @@ public class ConversationActivity extends XmppActivity if (this.xmppConnectionServiceBound) { this.xmppConnectionService.getNotificationService().setIsInForeground(true); } + if (!isConversationsOverviewVisable() || !isConversationsOverviewHideable()) { + sendReadMarkerIfNecessary(getSelectedConversation()); + } } @Override -- cgit v1.2.3