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:
Doug
2026-07-01 15:18:03 +01:00
committed by Doug
parent bdf53b64a8
commit 3ef66cdd05
55 changed files with 203 additions and 209 deletions
@@ -15,11 +15,11 @@ struct UserProfileScreenViewModelTests {
func initialState() async throws {
let userIndicatorController = UserIndicatorControllerMock()
let profile = UserProfileProxy(userID: "@alice:matrix.org", displayName: "Alice", avatarURL: .mockMXCAvatar)
let profile = UserProfile(userID: "@alice:matrix.org", displayName: "Alice", avatarURL: .mockMXCAvatar)
let clientProxy = ClientProxyMock(.init())
clientProxy.profileForReturnValue = .success(profile)
let viewModel = UserProfileScreenViewModel(userID: profile.userID,
let viewModel = UserProfileScreenViewModel(userID: profile.id,
isPresentedModally: false,
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
userIndicatorController: userIndicatorController,
@@ -39,11 +39,11 @@ struct UserProfileScreenViewModelTests {
func initialStateAccountOwner() async throws {
let userIndicatorController = UserIndicatorControllerMock()
let profile = UserProfileProxy(userID: RoomMemberProxyMock.mockMe.userID, displayName: "Me", avatarURL: .mockMXCAvatar)
let profile = UserProfile(userID: RoomMemberProxyMock.mockMe.userID, displayName: "Me", avatarURL: .mockMXCAvatar)
let clientProxy = ClientProxyMock(.init())
clientProxy.profileForReturnValue = .success(profile)
let viewModel = UserProfileScreenViewModel(userID: profile.userID,
let viewModel = UserProfileScreenViewModel(userID: profile.id,
isPresentedModally: false,
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
userIndicatorController: userIndicatorController,
@@ -63,13 +63,13 @@ struct UserProfileScreenViewModelTests {
func startingDmWithUnknownUserFetchesIdentity() async throws {
let userIndicatorController = UserIndicatorControllerMock()
let profile = UserProfileProxy.mockAlice
let profile = UserProfile.mockAlice
let clientProxy = ClientProxyMock(.init())
clientProxy.directRoomForUserIDReturnValue = .success(nil)
clientProxy.userIdentityForFallBackToServerReturnValue = .success(nil)
let viewModel = UserProfileScreenViewModel(userID: profile.userID,
let viewModel = UserProfileScreenViewModel(userID: profile.id,
isPresentedModally: false,
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
userIndicatorController: userIndicatorController,