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
|
val readReceiptsData = readReceipts
|
||||||
.map {
|
.map {
|
||||||
ReadReceiptData(it.roomMember.userId, it.roomMember.avatarUrl, it.roomMember.displayName, it.originServerTs)
|
ReadReceiptData(it.roomMember.userId, it.roomMember.avatarUrl, it.roomMember.displayName, it.originServerTs)
|
||||||
}
|
}.toList()
|
||||||
.toList()
|
val readReceiptsDataSorted = sortItem(readReceiptsData)
|
||||||
|
|
||||||
return ReadReceiptsItem_()
|
return ReadReceiptsItem_()
|
||||||
.id("read_receipts_$eventId")
|
.id("read_receipts_$eventId")
|
||||||
.eventId(eventId)
|
.eventId(eventId)
|
||||||
.readReceipts(readReceiptsData)
|
.readReceipts(readReceiptsDataSorted)
|
||||||
.avatarRenderer(avatarRenderer)
|
.avatarRenderer(avatarRenderer)
|
||||||
.shouldHideReadReceipts(isFromThreadTimeLine)
|
.shouldHideReadReceipts(isFromThreadTimeLine)
|
||||||
.clickListener {
|
.clickListener {
|
||||||
callback?.onReadReceiptsClicked(readReceiptsData)
|
callback?.onReadReceiptsClicked(readReceiptsDataSorted)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun sortItem(readReceipt: List<ReadReceiptData>): List<ReadReceiptData> {
|
||||||
|
return readReceipt.sortedByDescending {
|
||||||
|
it.timestamp
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue