mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-11 13:59:13 +00:00
fix: Do not call fullRoom
on all rooms.
`fullRoom` creates a `Timeline` for the room. Calling this method on all rooms doesn't make the room list fast :-). Needs https://github.com/matrix-org/matrix-rust-sdk/pull/2186 to be merged.
This commit is contained in:
parent
b2ab6103c3
commit
b1dc20e55c
@ -155,17 +155,15 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
lastMessageFormattedTimestamp = lastMessage.timestamp.formattedMinimal()
|
||||
attributedLastMessage = eventStringBuilder.buildAttributedString(for: lastMessage)
|
||||
}
|
||||
|
||||
let room = roomListItem.fullRoom()
|
||||
|
||||
let details = RoomSummaryDetails(id: roomListItem.id(),
|
||||
name: roomListItem.name() ?? room.id(),
|
||||
isDirect: room.isDirect(),
|
||||
avatarURL: room.avatarUrl().flatMap(URL.init(string:)),
|
||||
name: roomListItem.name() ?? roomListItem.id(),
|
||||
isDirect: roomListItem.isDirect(),
|
||||
avatarURL: roomListItem.avatarUrl().flatMap(URL.init(string:)),
|
||||
lastMessage: attributedLastMessage,
|
||||
lastMessageFormattedTimestamp: lastMessageFormattedTimestamp,
|
||||
unreadNotificationCount: UInt(roomListItem.unreadNotifications().notificationCount()),
|
||||
canonicalAlias: room.canonicalAlias())
|
||||
canonicalAlias: roomListItem.canonicalAlias())
|
||||
|
||||
return invalidated ? .invalidated(details: details) : .filled(details: details)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user