sending read marker when resuming activity and conversation is open

This commit is contained in:
iNPUTmice 2015-01-15 16:32:24 +01:00
parent c0993a9acb
commit dc8b467cf6
1 changed files with 4 additions and 1 deletions

View File

@ -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