render 'read up to this point' in 1:1 when followed by date bubble

fixes #3237
This commit is contained in:
Daniel Gultsch 2018-10-16 12:18:25 +02:00
parent 995f95ce99
commit 2edab21423
1 changed files with 9 additions and 6 deletions

View File

@ -2296,13 +2296,16 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
this.messageList.add(Message.createStatusMessage(conversation, getString(R.string.contact_has_stopped_typing, conversation.getName()))); this.messageList.add(Message.createStatusMessage(conversation, getString(R.string.contact_has_stopped_typing, conversation.getName())));
} else { } else {
for (int i = this.messageList.size() - 1; i >= 0; --i) { for (int i = this.messageList.size() - 1; i >= 0; --i) {
if (this.messageList.get(i).getStatus() == Message.STATUS_RECEIVED) { final Message message = this.messageList.get(i);
return; if (message.getType() != Message.TYPE_STATUS) {
} else { if (message.getStatus() == Message.STATUS_RECEIVED) {
if (this.messageList.get(i).getStatus() == Message.STATUS_SEND_DISPLAYED) {
this.messageList.add(i + 1,
Message.createStatusMessage(conversation, getString(R.string.contact_has_read_up_to_this_point, conversation.getName())));
return; return;
} else {
if (message.getStatus() == Message.STATUS_SEND_DISPLAYED) {
this.messageList.add(i + 1,
Message.createStatusMessage(conversation, getString(R.string.contact_has_read_up_to_this_point, conversation.getName())));
return;
}
} }
} }
} }