Code optimization.
This commit is contained in:
parent
c75995f925
commit
48e9b780b1
1 changed files with 1 additions and 4 deletions
|
|
@ -65,10 +65,7 @@ private fun createLastForwardIndicator(identifier: String): MatrixTimelineItem {
|
||||||
|
|
||||||
private fun List<MatrixTimelineItem>.latestEventIdentifier(): String {
|
private fun List<MatrixTimelineItem>.latestEventIdentifier(): String {
|
||||||
return findLast {
|
return findLast {
|
||||||
when (it) {
|
it is MatrixTimelineItem.Event
|
||||||
is MatrixTimelineItem.Event -> true
|
|
||||||
else -> false
|
|
||||||
}
|
|
||||||
}?.let {
|
}?.let {
|
||||||
(it as MatrixTimelineItem.Event).uniqueId
|
(it as MatrixTimelineItem.Event).uniqueId
|
||||||
} ?: "fake_id"
|
} ?: "fake_id"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue