mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:31:27 +00:00
Key backup returns (#1951)
* Converge on UserSessionFlowCoordinator logout confirmation * Add logout confirmation screen strings to untranslated. * Fix chat backup learn more URl fragment. * Implement logout flows that check recovery and key backup for the last session * Move logout confirmation screen strings to localazy * Change encrypted timeline item copy to "Waiting for decryption key" * Use different encrypted history banner based on key backup states * Introduce a SettingsFlowCoordinator and implement navigation directly to the secure backup screen from the logout flows. * Fix **mocked** secure backup controller flows * Simplify encrypted history banner logic * Address PR comments
This commit is contained in:
@@ -984,6 +984,24 @@ class MediaPlayerProviderMock: MediaPlayerProviderProtocol {
|
||||
await detachAllStatesExceptClosure?(exception)
|
||||
}
|
||||
}
|
||||
class NetworkMonitorMock: NetworkMonitorProtocol {
|
||||
var reachabilityPublisher: CurrentValuePublisher<NetworkMonitorReachability, Never> {
|
||||
get { return underlyingReachabilityPublisher }
|
||||
set(value) { underlyingReachabilityPublisher = value }
|
||||
}
|
||||
var underlyingReachabilityPublisher: CurrentValuePublisher<NetworkMonitorReachability, Never>!
|
||||
var isCurrentConnectionExpensive: Bool {
|
||||
get { return underlyingIsCurrentConnectionExpensive }
|
||||
set(value) { underlyingIsCurrentConnectionExpensive = value }
|
||||
}
|
||||
var underlyingIsCurrentConnectionExpensive: Bool!
|
||||
var isCurrentConnectionConstrained: Bool {
|
||||
get { return underlyingIsCurrentConnectionConstrained }
|
||||
set(value) { underlyingIsCurrentConnectionConstrained = value }
|
||||
}
|
||||
var underlyingIsCurrentConnectionConstrained: Bool!
|
||||
|
||||
}
|
||||
class NotificationCenterMock: NotificationCenterProtocol {
|
||||
|
||||
//MARK: - post
|
||||
@@ -2400,6 +2418,11 @@ class SecureBackupControllerMock: SecureBackupControllerProtocol {
|
||||
set(value) { underlyingKeyBackupState = value }
|
||||
}
|
||||
var underlyingKeyBackupState: CurrentValuePublisher<SecureBackupKeyBackupState, Never>!
|
||||
var isLastSession: Bool {
|
||||
get { return underlyingIsLastSession }
|
||||
set(value) { underlyingIsLastSession = value }
|
||||
}
|
||||
var underlyingIsLastSession: Bool!
|
||||
|
||||
//MARK: - enableBackup
|
||||
|
||||
@@ -2473,6 +2496,18 @@ class SecureBackupControllerMock: SecureBackupControllerProtocol {
|
||||
return confirmRecoveryKeyReturnValue
|
||||
}
|
||||
}
|
||||
//MARK: - waitForKeyBackup
|
||||
|
||||
var waitForKeyBackupCallsCount = 0
|
||||
var waitForKeyBackupCalled: Bool {
|
||||
return waitForKeyBackupCallsCount > 0
|
||||
}
|
||||
var waitForKeyBackupClosure: (() async -> Void)?
|
||||
|
||||
func waitForKeyBackup() async {
|
||||
waitForKeyBackupCallsCount += 1
|
||||
await waitForKeyBackupClosure?()
|
||||
}
|
||||
}
|
||||
class SessionVerificationControllerProxyMock: SessionVerificationControllerProxyProtocol {
|
||||
var callbacks: PassthroughSubject<SessionVerificationControllerProxyCallback, Never> {
|
||||
|
||||
Reference in New Issue
Block a user