-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix slow paged room list regression #6233
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix | performance regression on roomlist + proper display of space parents in explore rooms. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,7 +207,9 @@ class RoomSummaryItemFactory @Inject constructor( | |
|
||
private fun getSearchResultSubtitle(roomSummary: RoomSummary): String { | ||
val userId = roomSummary.directUserId | ||
val spaceName = roomSummary.spaceParents?.firstOrNull()?.roomSummary?.name | ||
val spaceName = roomSummary.flattenParents | ||
.takeIf { it.isNotEmpty() } | ||
?.joinToString(", ") { it.name } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although this is nice, I'm thinking now to maintain parity with web, we only take the last element in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't look to me what web is taking the last one only. What are the requirement exactly? |
||
val canonicalAlias = roomSummary.canonicalAlias | ||
|
||
return (userId ?: spaceName ?: canonicalAlias).orEmpty() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, but please add this mention in the Kdoc and not here, or it will not be exported.