LoadRoomMembers: exclude Membership.Leave

This commit is contained in:
ganfra 2022-06-29 11:34:43 +02:00
parent 3a216759a1
commit 63f0cce561
2 changed files with 3 additions and 2 deletions

View File

@ -58,7 +58,7 @@ internal class DefaultMembershipService @AssistedInject constructor(
}
override suspend fun loadRoomMembersIfNeeded() {
val params = LoadRoomMembersTask.Params(roomId, Membership.LEAVE)
val params = LoadRoomMembersTask.Params(roomId, excludeMembership = Membership.LEAVE)
loadRoomMembersTask.execute(params)
}

View File

@ -33,6 +33,7 @@ import kotlinx.coroutines.withContext
import okhttp3.internal.closeQuietly
import org.matrix.android.sdk.api.MatrixCoroutineDispatchers
import org.matrix.android.sdk.api.extensions.tryOrNull
import org.matrix.android.sdk.api.session.room.model.Membership
import org.matrix.android.sdk.api.session.room.timeline.Timeline
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
import org.matrix.android.sdk.api.session.room.timeline.TimelineSettings
@ -388,7 +389,7 @@ internal class DefaultTimeline(
}
private suspend fun loadRoomMembersIfNeeded() {
val loadRoomMembersParam = LoadRoomMembersTask.Params(roomId)
val loadRoomMembersParam = LoadRoomMembersTask.Params(roomId, excludeMembership = Membership.LEAVE)
try {
loadRoomMembersTask.execute(loadRoomMembersParam)
} catch (failure: Throwable) {