mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
@@ -45,6 +45,8 @@ class ClientProxy: ClientProxyProtocol {
|
||||
|
||||
let notificationSettings: NotificationSettingsProxyProtocol
|
||||
|
||||
let secureBackupController: SecureBackupControllerProtocol
|
||||
|
||||
private let roomListRecencyOrderingAllowedEventTypes = ["m.room.message", "m.room.encrypted", "m.sticker"]
|
||||
|
||||
private var loadCachedAvatarURLTask: Task<Void, Never>?
|
||||
@@ -93,6 +95,8 @@ class ClientProxy: ClientProxyProtocol {
|
||||
|
||||
notificationSettings = NotificationSettingsProxy(notificationSettings: client.getNotificationSettings(),
|
||||
backgroundTaskService: backgroundTaskService)
|
||||
|
||||
secureBackupController = SecureBackupController()
|
||||
|
||||
client.setDelegate(delegate: ClientDelegateWrapper { [weak self] isSoftLogout in
|
||||
self?.hasEncounteredAuthError = true
|
||||
|
||||
@@ -95,6 +95,8 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
|
||||
|
||||
var notificationSettings: NotificationSettingsProxyProtocol { get }
|
||||
|
||||
var secureBackupController: SecureBackupControllerProtocol { get }
|
||||
|
||||
func startSync()
|
||||
|
||||
func stopSync()
|
||||
|
||||
@@ -39,6 +39,13 @@ class MockClientProxy: ClientProxyProtocol {
|
||||
var userDisplayName: CurrentValuePublisher<String?, Never> { CurrentValueSubject<String?, Never>("User display name").asCurrentValuePublisher() }
|
||||
|
||||
var notificationSettings: NotificationSettingsProxyProtocol = NotificationSettingsProxyMock(with: .init())
|
||||
|
||||
lazy var secureBackupController: SecureBackupControllerProtocol = {
|
||||
let secureBackupController = SecureBackupControllerMock()
|
||||
secureBackupController.underlyingRecoveryKeyState = .init(CurrentValueSubject<SecureBackupRecoveryKeyState, Never>(.disabled))
|
||||
secureBackupController.underlyingKeyBackupState = .init(CurrentValueSubject<SecureBackupKeyBackupState, Never>(.enabled))
|
||||
return secureBackupController
|
||||
}()
|
||||
|
||||
init(userID: String, deviceID: String? = nil, roomSummaryProvider: RoomSummaryProviderProtocol? = MockRoomSummaryProvider()) {
|
||||
self.userID = userID
|
||||
|
||||
Reference in New Issue
Block a user