mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
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:
committed by
GitHub
parent
f74486f525
commit
a11ca17242
+3
@@ -221,6 +221,9 @@ class RustMatrixClient(
|
|||||||
override val userProfile: StateFlow<MatrixUser> = _userProfile
|
override val userProfile: StateFlow<MatrixUser> = _userProfile
|
||||||
|
|
||||||
override val ignoredUsersFlow = mxCallbackFlow<ImmutableList<UserId>> {
|
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 {
|
innerClient.subscribeToIgnoredUsers(object : IgnoredUsersListener {
|
||||||
override fun call(ignoredUserIds: List<String>) {
|
override fun call(ignoredUserIds: List<String>) {
|
||||||
channel.trySend(ignoredUserIds.map(::UserId).toPersistentList())
|
channel.trySend(ignoredUserIds.map(::UserId).toPersistentList())
|
||||||
|
|||||||
Reference in New Issue
Block a user