mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +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:
committed by
Stefan Ceriu
parent
b2ab6103c3
commit
b1dc20e55c
@@ -156,16 +156,14 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
|||||||
attributedLastMessage = eventStringBuilder.buildAttributedString(for: lastMessage)
|
attributedLastMessage = eventStringBuilder.buildAttributedString(for: lastMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
let room = roomListItem.fullRoom()
|
|
||||||
|
|
||||||
let details = RoomSummaryDetails(id: roomListItem.id(),
|
let details = RoomSummaryDetails(id: roomListItem.id(),
|
||||||
name: roomListItem.name() ?? room.id(),
|
name: roomListItem.name() ?? roomListItem.id(),
|
||||||
isDirect: room.isDirect(),
|
isDirect: roomListItem.isDirect(),
|
||||||
avatarURL: room.avatarUrl().flatMap(URL.init(string:)),
|
avatarURL: roomListItem.avatarUrl().flatMap(URL.init(string:)),
|
||||||
lastMessage: attributedLastMessage,
|
lastMessage: attributedLastMessage,
|
||||||
lastMessageFormattedTimestamp: lastMessageFormattedTimestamp,
|
lastMessageFormattedTimestamp: lastMessageFormattedTimestamp,
|
||||||
unreadNotificationCount: UInt(roomListItem.unreadNotifications().notificationCount()),
|
unreadNotificationCount: UInt(roomListItem.unreadNotifications().notificationCount()),
|
||||||
canonicalAlias: room.canonicalAlias())
|
canonicalAlias: roomListItem.canonicalAlias())
|
||||||
|
|
||||||
return invalidated ? .invalidated(details: details) : .filled(details: details)
|
return invalidated ? .invalidated(details: details) : .filled(details: details)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user