Pass the full room into the invited room proxy and stop automatically retrieving the preview

- this will help speed up leaving invites but also stop fetching previews twice in the join room screen
This commit is contained in:
Stefan Ceriu
2025-05-23 11:59:38 +03:00
committed by Stefan Ceriu
parent 29cfcb0b85
commit a7c4a32285
3 changed files with 86 additions and 20 deletions
@@ -908,9 +908,12 @@ class ClientProxy: ClientProxyProtocol {
switch roomListItem.membership() {
case .invited:
return try await .invited(InvitedRoomProxy(roomListItem: roomListItem,
roomPreview: roomListItem.previewRoom(via: []),
ownUserID: userID))
guard let room = try client.getRoom(roomId: roomID) else {
MXLog.error("Could not find room with ID: \(roomID)")
return nil
}
return try await .invited(InvitedRoomProxy(room: room))
case .knocked:
if appSettings.knockingEnabled {
return try await .knocked(KnockedRoomProxy(roomListItem: roomListItem,