mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Improve user search using the GET profile (#754)
* Add getProfile in ClientProxyProtocol * Add fetchProfileIfNeeded * Refactor search * Update StartChatSuggestedUserCell UI * Add showProfilePopover action * Remove popover code * Add UTs in StartChatViewModelTests * Add UI tests * Cleanup code * Refine design * Fix design * Localise StartChatSuggestedUserCell * Update localisations * Update StartChatSuggestedUserCell design * Fix UT * Fix PR comments * Apply suggestions * Fix typo
This commit is contained in:
@@ -115,4 +115,11 @@ class MockClientProxy: ClientProxyProtocol {
|
||||
func searchUsers(searchTerm: String, limit: UInt) async -> Result<SearchUsersResults, ClientProxyError> {
|
||||
searchUsersResult
|
||||
}
|
||||
|
||||
var getProfileResult: Result<UserProfile, ClientProxyError> = .success(.init(userID: "@a:b.com", displayName: "Some user"))
|
||||
private(set) var getProfileCalled = false
|
||||
func getProfile(for userID: String) async -> Result<UserProfile, ClientProxyError> {
|
||||
getProfileCalled = true
|
||||
return getProfileResult
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user