Fix bug: readReceipt in wrong order
This commit is contained in:
parent
acfeb7ff65
commit
025dcc8d88
|
@ -0,0 +1 @@
|
|||
Read receipt in wrong order
|
|
@ -37,17 +37,22 @@ class ReadReceiptsItemFactory @Inject constructor(private val avatarRenderer: Av
|
|||
val readReceiptsData = readReceipts
|
||||
.map {
|
||||
ReadReceiptData(it.roomMember.userId, it.roomMember.avatarUrl, it.roomMember.displayName, it.originServerTs)
|
||||
}
|
||||
.toList()
|
||||
|
||||
}.toList()
|
||||
val readReceiptsDataSorted = sortItem(readReceiptsData)
|
||||
return ReadReceiptsItem_()
|
||||
.id("read_receipts_$eventId")
|
||||
.eventId(eventId)
|
||||
.readReceipts(readReceiptsData)
|
||||
.readReceipts(readReceiptsDataSorted)
|
||||
.avatarRenderer(avatarRenderer)
|
||||
.shouldHideReadReceipts(isFromThreadTimeLine)
|
||||
.clickListener {
|
||||
callback?.onReadReceiptsClicked(readReceiptsData)
|
||||
callback?.onReadReceiptsClicked(readReceiptsDataSorted)
|
||||
}
|
||||
}
|
||||
|
||||
fun sortItem(readReceipt: List<ReadReceiptData>): List<ReadReceiptData> {
|
||||
return readReceipt.sortedByDescending {
|
||||
it.timestamp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue