mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Add tests and clean code after RoomList Filter rework
This commit is contained in:
+1
-3
@@ -18,13 +18,11 @@ import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.buffer
|
||||
import kotlinx.coroutines.flow.callbackFlow
|
||||
import kotlinx.coroutines.flow.catch
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import org.matrix.rustcomponents.sdk.Room
|
||||
import org.matrix.rustcomponents.sdk.RoomListDynamicEntriesController
|
||||
import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind
|
||||
import org.matrix.rustcomponents.sdk.RoomListEntriesListener
|
||||
import org.matrix.rustcomponents.sdk.RoomListEntriesUpdate
|
||||
import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind
|
||||
import org.matrix.rustcomponents.sdk.RoomListInterface
|
||||
import org.matrix.rustcomponents.sdk.RoomListLoadingState
|
||||
import org.matrix.rustcomponents.sdk.RoomListLoadingStateListener
|
||||
|
||||
-2
@@ -90,8 +90,6 @@ internal class RoomListFactory(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private fun RoomListLoadingState.toLoadingState(): RoomList.LoadingState {
|
||||
return when (this) {
|
||||
is RoomListLoadingState.Loaded -> RoomList.LoadingState.Loaded(maximumNumberOfRooms?.toInt() ?: 0)
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ import org.matrix.rustcomponents.sdk.RoomListFilterCategory
|
||||
* Mapper for converting RoomListFilter to Rust SDK filter kinds.
|
||||
*/
|
||||
internal object RoomListFilterMapper {
|
||||
|
||||
/**
|
||||
* Base rust filters to always apply across all room lists.
|
||||
* These filters ensure we show:
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ internal class RustDynamicRoomList(
|
||||
private val dynamicController: () -> RoomListDynamicEntriesController?,
|
||||
private val addPagesCount: Int = DEFAULT_ADD_PAGES_COUNT
|
||||
) : DynamicRoomList {
|
||||
|
||||
private val mutex = Mutex()
|
||||
|
||||
override suspend fun rebuildSummaries() {
|
||||
|
||||
Reference in New Issue
Block a user