Properly show group message header after a date divider.

This commit is contained in:
Greyson Parrelli 2018-07-24 16:33:45 -04:00
parent 0ced767ef2
commit c7fb1d79c4

View File

@ -702,7 +702,9 @@ public class ConversationItem extends LinearLayout
private void setAuthor(@NonNull MessageRecord current, @NonNull Optional<MessageRecord> previous, @NonNull Optional<MessageRecord> next, boolean isGroupThread) {
if (isGroupThread && !current.isOutgoing()) {
if (!previous.isPresent() || previous.get().isUpdate() || !current.getRecipient().getAddress().equals(previous.get().getRecipient().getAddress())) {
if (!previous.isPresent() || previous.get().isUpdate() || !current.getRecipient().getAddress().equals(previous.get().getRecipient().getAddress()) ||
!DateUtils.isSameDay(previous.get().getTimestamp(), current.getTimestamp()))
{
groupSenderHolder.setVisibility(VISIBLE);
} else {
groupSenderHolder.setVisibility(GONE);