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,10 +2296,12 @@ 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);
if (message.getType() != Message.TYPE_STATUS) {
if (message.getStatus() == Message.STATUS_RECEIVED) {
return; return;
} else { } else {
if (this.messageList.get(i).getStatus() == Message.STATUS_SEND_DISPLAYED) { if (message.getStatus() == Message.STATUS_SEND_DISPLAYED) {
this.messageList.add(i + 1, this.messageList.add(i + 1,
Message.createStatusMessage(conversation, getString(R.string.contact_has_read_up_to_this_point, conversation.getName()))); Message.createStatusMessage(conversation, getString(R.string.contact_has_read_up_to_this_point, conversation.getName())));
return; return;
@ -2307,6 +2309,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
} }
} }
} }
}
} else { } else {
final MucOptions mucOptions = conversation.getMucOptions(); final MucOptions mucOptions = conversation.getMucOptions();
final List<MucOptions.User> allUsers = mucOptions.getUsers(); final List<MucOptions.User> allUsers = mucOptions.getUsers();