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) {
|
public void sendReadMarkerIfNecessary(final Conversation conversation) {
|
||||||
if (!mActivityPaused && !conversation.isRead()) {
|
if (!mActivityPaused && conversation != null && !conversation.isRead()) {
|
||||||
xmppConnectionService.sendReadMarker(conversation);
|
xmppConnectionService.sendReadMarker(conversation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -761,6 +761,9 @@ public class ConversationActivity extends XmppActivity
|
||||||
if (this.xmppConnectionServiceBound) {
|
if (this.xmppConnectionServiceBound) {
|
||||||
this.xmppConnectionService.getNotificationService().setIsInForeground(true);
|
this.xmppConnectionService.getNotificationService().setIsInForeground(true);
|
||||||
}
|
}
|
||||||
|
if (!isConversationsOverviewVisable() || !isConversationsOverviewHideable()) {
|
||||||
|
sendReadMarkerIfNecessary(getSelectedConversation());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue