Fix message clustering bug

This commit is contained in:
Niels Andriesse 2021-07-14 14:27:21 +10:00
parent b25feb221a
commit 073c9a9efa

View File

@ -164,10 +164,10 @@ class VisibleMessageView : LinearLayout {
private fun isStartOfMessageCluster(current: MessageRecord, previous: MessageRecord?, isGroupThread: Boolean): Boolean {
return if (isGroupThread) {
previous == null || previous.isUpdate || !DateUtils.isSameDay(current.timestamp, previous.timestamp)
previous == null || previous.isUpdate || !DateUtils.isSameHour(current.timestamp, previous.timestamp)
|| current.recipient.address != previous.recipient.address
} else {
previous == null || previous.isUpdate || !DateUtils.isSameDay(current.timestamp, previous.timestamp)
previous == null || previous.isUpdate || !DateUtils.isSameHour(current.timestamp, previous.timestamp)
|| current.isOutgoing != previous.isOutgoing
}
}