Skip to content

Commit a187e8c

Browse files
committed
Simplify getBaseRoom: use only Client.getRoom
1 parent 3af48db commit a187e8c

File tree

1 file changed

+1
-6
lines changed
  • libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,7 @@ class RustRoomFactory(
8484
}
8585

8686
private suspend fun getBaseRoom(roomListItem: RoomListItem): RustBaseRoom? {
87-
val room = if (roomListItem.isTimelineInitialized()) {
88-
roomListItem.fullRoom()
89-
} else {
90-
innerClient.getRoom(roomListItem.id())
91-
} ?: return null
92-
87+
val room = innerClient.getRoom(roomListItem.id()) ?: return null
9388
val initialRoomInfo = room.roomInfo()
9489
return RustBaseRoom(
9590
sessionId = sessionId,

0 commit comments

Comments
 (0)