mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 20:39:24 +00:00
Rename UserProfileProxy to UserProfile. It's a pure struct and proxies nothing.
Also remove the redundant `userID` property given `id` already exists (for Identifiable conformance).
This commit is contained in:
@@ -786,7 +786,7 @@ class ClientProxy: ClientProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func profile(for userID: String) async -> Result<UserProfileProxy, ClientProxyError> {
|
||||
func profile(for userID: String) async -> Result<UserProfile, ClientProxyError> {
|
||||
do {
|
||||
return try await .success(.init(sdkUserProfile: client.getProfile(userId: userID)))
|
||||
} catch {
|
||||
@@ -933,14 +933,14 @@ class ClientProxy: ClientProxyProtocol {
|
||||
return rooms
|
||||
}
|
||||
|
||||
func recentConversationCounterparts() async -> [UserProfileProxy] {
|
||||
func recentConversationCounterparts() async -> [UserProfile] {
|
||||
let maxResultsToReturn = 5
|
||||
|
||||
guard case let .success(roomIdentifiers) = await recentlyVisitedRoomIDs() else {
|
||||
return []
|
||||
}
|
||||
|
||||
var users: OrderedSet<UserProfileProxy> = []
|
||||
var users: OrderedSet<UserProfile> = []
|
||||
|
||||
for roomID in roomIdentifiers {
|
||||
guard case let .joined(roomProxy) = await roomForIdentifier(roomID),
|
||||
|
||||
@@ -232,7 +232,7 @@ protocol ClientProxyProtocol: AnyObject {
|
||||
|
||||
func searchUsers(searchTerm: String, limit: UInt) async -> Result<SearchUsersResultsProxy, ClientProxyError>
|
||||
|
||||
func profile(for userID: String) async -> Result<UserProfileProxy, ClientProxyError>
|
||||
func profile(for userID: String) async -> Result<UserProfile, ClientProxyError>
|
||||
|
||||
func roomDirectorySearchProxy() -> RoomDirectorySearchProxyProtocol
|
||||
|
||||
@@ -261,7 +261,7 @@ protocol ClientProxyProtocol: AnyObject {
|
||||
func trackRecentlyVisitedRoom(_ roomID: String) async -> Result<Void, ClientProxyError>
|
||||
|
||||
func recentlyVisitedRooms(filter: @Sendable (JoinedRoomProxyProtocol) -> Bool) async -> [JoinedRoomProxyProtocol]
|
||||
func recentConversationCounterparts() async -> [UserProfileProxy]
|
||||
func recentConversationCounterparts() async -> [UserProfile]
|
||||
|
||||
// MARK: - Crypto
|
||||
|
||||
|
||||
Reference in New Issue
Block a user