sending read marker when resuming activity and conversation is open
This commit is contained in:
parent
c0993a9acb
commit
dc8b467cf6
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue