mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 18:05:36 +03:00
Set local room members as loaded
This commit is contained in:
parent
0d9cd2b3a3
commit
e89bb0eea7
2 changed files with 2 additions and 2 deletions
|
@ -44,6 +44,7 @@ import org.matrix.android.sdk.internal.database.model.ChunkEntity
|
|||
import org.matrix.android.sdk.internal.database.model.CurrentStateEventEntity
|
||||
import org.matrix.android.sdk.internal.database.model.EventInsertType
|
||||
import org.matrix.android.sdk.internal.database.model.RoomEntity
|
||||
import org.matrix.android.sdk.internal.database.model.RoomMembersLoadStatusType
|
||||
import org.matrix.android.sdk.internal.database.model.RoomSummaryEntity
|
||||
import org.matrix.android.sdk.internal.database.query.copyToRealmOrIgnore
|
||||
import org.matrix.android.sdk.internal.database.query.getOrCreate
|
||||
|
@ -94,6 +95,7 @@ internal class DefaultCreateLocalRoomTask @Inject constructor(
|
|||
RoomEntity.getOrCreate(realm, roomId).apply {
|
||||
membership = Membership.JOIN
|
||||
chunks.add(createLocalRoomChunk(realm, roomId, createRoomBody))
|
||||
membersLoadStatus = RoomMembersLoadStatusType.LOADED
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ 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.model.localecho.RoomLocalEcho
|
||||
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
|
||||
|
@ -390,7 +389,6 @@ internal class DefaultTimeline(
|
|||
}
|
||||
|
||||
private suspend fun loadRoomMembersIfNeeded() {
|
||||
if (RoomLocalEcho.isLocalEchoId(roomId)) return
|
||||
val loadRoomMembersParam = LoadRoomMembersTask.Params(roomId, excludeMembership = Membership.LEAVE)
|
||||
try {
|
||||
loadRoomMembersTask.execute(loadRoomMembersParam)
|
||||
|
|
Loading…
Reference in a new issue