Restore Breadcrumbs comparator, we can maybe improve this later
This commit is contained in:
parent
b66b96899e
commit
930d62c87b
|
@ -31,12 +31,13 @@ import im.vector.matrix.rx.rx
|
|||
import im.vector.riotx.core.extensions.exhaustive
|
||||
import im.vector.riotx.core.platform.VectorViewModel
|
||||
import im.vector.riotx.features.attachments.toGroupedContentAttachmentData
|
||||
import im.vector.riotx.features.home.room.list.ChronologicalRoomComparator
|
||||
import im.vector.riotx.features.home.room.list.BreadcrumbsRoomComparator
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class IncomingShareViewModel @AssistedInject constructor(@Assisted initialState: IncomingShareViewState,
|
||||
class IncomingShareViewModel @AssistedInject constructor(
|
||||
@Assisted initialState: IncomingShareViewState,
|
||||
private val session: Session,
|
||||
private val chronologicalRoomComparator: ChronologicalRoomComparator)
|
||||
private val breadcrumbsRoomComparator: BreadcrumbsRoomComparator)
|
||||
: VectorViewModel<IncomingShareViewState, IncomingShareAction, IncomingShareViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
|
@ -83,7 +84,7 @@ class IncomingShareViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
session.rx().liveRoomSummaries(filterQueryParams)
|
||||
}
|
||||
.throttleLast(300, TimeUnit.MILLISECONDS)
|
||||
.map { it.sortedWith(chronologicalRoomComparator) }
|
||||
.map { it.sortedWith(breadcrumbsRoomComparator) }
|
||||
.execute {
|
||||
copy(filteredRoomSummaries = it)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue