-
Notifications
You must be signed in to change notification settings - Fork 731
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
Add user completion for matrix ids #8271
Conversation
.filter { roomMemberSummary -> | ||
query?.let { | ||
it.isBlank() || roomMemberSummary.displayName?.contains(it, true).orFalse() || roomMemberSummary.userId.contains(it, true) | ||
}.orTrue() | ||
} |
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.
I'm wondering if it's better to add the filter on the resulting list or in the realm query, something like this should work:
override fun getRoomMembers(queryParams: RoomMemberQueryParams, query: String): List<RoomMemberSummary> {
return monarchy.fetchAllMappedSync(
{
roomMembersQuery(it, queryParams)
.and()
.contains(RoomMemberSummaryEntityFields.USER_ID, query)
.or()
.contains(RoomMemberSummaryEntityFields.DISPLAY_NAME, query)
},
{
it.asDomain()
}
)
}
WDYT?
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.
Maybe add val displayNameOrUserId: QueryStringValue,
to the data class RoomMemberQueryParams
?
8f0f3a8
to
a1130fb
Compare
Kudos, SonarCloud Quality Gate passed! |
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.
Changes LGTM
Type of change
Content
Add user completion for matrix ids
Motivation and context
#8217
Screenshots / GIFs
Tests
Tested devices
Checklist