Skip to content

Commit a11ca17

Browse files
authored
Fetch the initial ignored user list manually (#4598)
The SDK won't return it automatically, so we need to fetch it manually.
1 parent f74486f commit a11ca17

File tree

1 file changed

+3
-0
lines changed
  • libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl

1 file changed

+3
-0
lines changed

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClient.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ class RustMatrixClient(
221221
override val userProfile: StateFlow<MatrixUser> = _userProfile
222222

223223
override val ignoredUsersFlow = mxCallbackFlow<ImmutableList<UserId>> {
224+
// Fetch the initial value manually, the SDK won't return it automatically
225+
channel.trySend(innerClient.ignoredUsers().map(::UserId).toPersistentList())
226+
224227
innerClient.subscribeToIgnoredUsers(object : IgnoredUsersListener {
225228
override fun call(ignoredUserIds: List<String>) {
226229
channel.trySend(ignoredUserIds.map(::UserId).toPersistentList())

0 commit comments

Comments
 (0)