mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 01:45:52 +03:00
Fix PR comment
This commit is contained in:
parent
025dcc8d88
commit
6c7b4d4256
1 changed files with 4 additions and 10 deletions
|
@ -37,22 +37,16 @@ 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()
|
||||
val readReceiptsDataSorted = sortItem(readReceiptsData)
|
||||
}
|
||||
.sortedByDescending { it.timestamp }
|
||||
return ReadReceiptsItem_()
|
||||
.id("read_receipts_$eventId")
|
||||
.eventId(eventId)
|
||||
.readReceipts(readReceiptsDataSorted)
|
||||
.readReceipts(readReceiptsData)
|
||||
.avatarRenderer(avatarRenderer)
|
||||
.shouldHideReadReceipts(isFromThreadTimeLine)
|
||||
.clickListener {
|
||||
callback?.onReadReceiptsClicked(readReceiptsDataSorted)
|
||||
callback?.onReadReceiptsClicked(readReceiptsData)
|
||||
}
|
||||
}
|
||||
|
||||
fun sortItem(readReceipt: List<ReadReceiptData>): List<ReadReceiptData> {
|
||||
return readReceipt.sortedByDescending {
|
||||
it.timestamp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue