mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -2267,9 +2267,21 @@ class ClientProxyMock: ClientProxyProtocol, @unchecked Sendable {
|
||||
}
|
||||
var underlyingIgnoredUsersPublisher: CurrentValuePublisher<[String]?, Never>!
|
||||
var pusherNotificationClientIdentifier: String?
|
||||
var roomSummaryProvider: RoomSummaryProviderProtocol?
|
||||
var alternateRoomSummaryProvider: RoomSummaryProviderProtocol?
|
||||
var staticRoomSummaryProvider: StaticRoomSummaryProviderProtocol?
|
||||
var roomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
get { return underlyingRoomSummaryProvider }
|
||||
set(value) { underlyingRoomSummaryProvider = value }
|
||||
}
|
||||
var underlyingRoomSummaryProvider: RoomSummaryProviderProtocol!
|
||||
var alternateRoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
get { return underlyingAlternateRoomSummaryProvider }
|
||||
set(value) { underlyingAlternateRoomSummaryProvider = value }
|
||||
}
|
||||
var underlyingAlternateRoomSummaryProvider: RoomSummaryProviderProtocol!
|
||||
var staticRoomSummaryProvider: StaticRoomSummaryProviderProtocol {
|
||||
get { return underlyingStaticRoomSummaryProvider }
|
||||
set(value) { underlyingStaticRoomSummaryProvider = value }
|
||||
}
|
||||
var underlyingStaticRoomSummaryProvider: StaticRoomSummaryProviderProtocol!
|
||||
var roomsToAwait: Set<String> {
|
||||
get { return underlyingRoomsToAwait }
|
||||
set(value) { underlyingRoomsToAwait = value }
|
||||
|
||||
Reference in New Issue
Block a user