Add test on RustRoomDirectoryService
This commit is contained in:
parent
77e6a9450a
commit
47df0d1e40
5 changed files with 42 additions and 2 deletions
|
|
@ -19,8 +19,8 @@ import kotlin.coroutines.CoroutineContext
|
|||
class RoomDirectorySearchProcessor(
|
||||
private val roomDescriptions: MutableSharedFlow<List<RoomDescription>>,
|
||||
private val coroutineContext: CoroutineContext,
|
||||
private val roomDescriptionMapper: RoomDescriptionMapper,
|
||||
) {
|
||||
private val roomDescriptionMapper: RoomDescriptionMapper = RoomDescriptionMapper()
|
||||
private val mutex = Mutex()
|
||||
|
||||
suspend fun postUpdates(updates: List<RoomDirectorySearchEntryUpdate>) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class RustRoomDirectoryList(
|
|||
) : RoomDirectoryList {
|
||||
private val hasMoreToLoad = MutableStateFlow(true)
|
||||
private val items = MutableSharedFlow<List<RoomDescription>>(replay = 1)
|
||||
private val processor = RoomDirectorySearchProcessor(items, coroutineContext, RoomDescriptionMapper())
|
||||
private val processor = RoomDirectorySearchProcessor(items, coroutineContext)
|
||||
|
||||
init {
|
||||
launchIn(coroutineScope)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue