Observe ignoredUsersFlow to have live data about blocked user.
This will also ensure that blocking a user will work even if the user is not a member of the room (preparatory work for user permalink)
This commit is contained in:
parent
f2f29c6638
commit
87298803c6
3 changed files with 46 additions and 35 deletions
|
|
@ -48,6 +48,7 @@ import io.element.android.libraries.matrix.test.verification.FakeSessionVerifica
|
|||
import io.element.android.tests.testutils.simulateLongTask
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
|
|
@ -205,6 +206,10 @@ class FakeMatrixClient(
|
|||
return RoomMembershipObserver()
|
||||
}
|
||||
|
||||
suspend fun emitIgnoreUserList(users: List<UserId>) {
|
||||
ignoredUsersFlow.emit(users.toImmutableList())
|
||||
}
|
||||
|
||||
// Mocks
|
||||
|
||||
fun givenLogoutError(failure: Throwable?) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue