aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2015-01-15 16:32:24 +0100
committeriNPUTmice <daniel@gultsch.de>2015-01-15 16:32:24 +0100
commitdc8b467cf63af3466e13f58c8abc63875a44754e (patch)
tree8ba0cf453bb9d9fe118407605a1b5ccb20713ce5 /src/main/java/eu/siacs/conversations/ui
parentc0993a9acb7be045d75e1c1dcc4c0fafc879a31e (diff)
sending read marker when resuming activity and conversation is open
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java5
1 files changed, 4 insertions, 1 deletions
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