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

View file

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