refactored the ClientProxy to:

- throw an error during the init
- to have its init directly instantiate the sync service and the providers

Update ElementX/Sources/Services/UserSession/UserSessionStore.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

renamed
This commit is contained in:
Mauro Romito
2025-03-06 12:16:28 +01:00
committed by Mauro
parent 7058334614
commit 32036e5b66
10 changed files with 134 additions and 148 deletions

View File

@@ -13,7 +13,7 @@ struct ClientProxyMockConfiguration {
var userIDServerName: String?
var userID: String = RoomMemberProxyMock.mockMe.userID
var deviceID: String?
var roomSummaryProvider: RoomSummaryProviderProtocol? = RoomSummaryProviderMock(.init())
var roomSummaryProvider: RoomSummaryProviderProtocol = RoomSummaryProviderMock(.init())
var roomDirectorySearchProxy: RoomDirectorySearchProxyProtocol?
var recoveryState: SecureBackupRecoveryState = .enabled
@@ -86,7 +86,7 @@ extension ClientProxyMock {
resetIdentityReturnValue = .success(IdentityResetHandleSDKMock(.init()))
roomForIdentifierClosure = { [weak self] identifier in
guard let room = self?.roomSummaryProvider?.roomListPublisher.value.first(where: { $0.id == identifier }) else {
guard let room = self?.roomSummaryProvider.roomListPublisher.value.first(where: { $0.id == identifier }) else {
return nil
}