Fetch the initial ignored user list manually (#4598)
The SDK won't return it automatically, so we need to fetch it manually.
This commit is contained in:
parent
f74486f525
commit
a11ca17242
1 changed files with 3 additions and 0 deletions
|
|
@ -221,6 +221,9 @@ class RustMatrixClient(
|
|||
override val userProfile: StateFlow<MatrixUser> = _userProfile
|
||||
|
||||
override val ignoredUsersFlow = mxCallbackFlow<ImmutableList<UserId>> {
|
||||
// Fetch the initial value manually, the SDK won't return it automatically
|
||||
channel.trySend(innerClient.ignoredUsers().map(::UserId).toPersistentList())
|
||||
|
||||
innerClient.subscribeToIgnoredUsers(object : IgnoredUsersListener {
|
||||
override fun call(ignoredUserIds: List<String>) {
|
||||
channel.trySend(ignoredUserIds.map(::UserId).toPersistentList())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue