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:
@@ -29,6 +29,11 @@ class SecureBackupController: SecureBackupControllerProtocol {
|
||||
keyBackupStateSubject.asCurrentValuePublisher()
|
||||
}
|
||||
|
||||
var isLastSession: Bool {
|
||||
#warning("FIXME")
|
||||
return true
|
||||
}
|
||||
|
||||
func enableBackup() async -> Result<Void, SecureBackupControllerError> {
|
||||
keyBackupStateSubject.send(.enabling)
|
||||
|
||||
@@ -76,4 +81,8 @@ class SecureBackupController: SecureBackupControllerProtocol {
|
||||
|
||||
return .success(())
|
||||
}
|
||||
|
||||
func waitForKeyBackup() async {
|
||||
try? await Task.sleep(for: .seconds(5))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,11 +49,15 @@ protocol SecureBackupControllerProtocol {
|
||||
|
||||
var keyBackupState: CurrentValuePublisher<SecureBackupKeyBackupState, Never> { get }
|
||||
|
||||
var isLastSession: Bool { get }
|
||||
|
||||
func enableBackup() async -> Result<Void, SecureBackupControllerError>
|
||||
func disableBackup() async -> Result<Void, SecureBackupControllerError>
|
||||
|
||||
func generateRecoveryKey() async -> Result<String, SecureBackupControllerError>
|
||||
func confirmRecoveryKey(_ key: String) async -> Result<Void, SecureBackupControllerError>
|
||||
|
||||
func waitForKeyBackup() async
|
||||
}
|
||||
|
||||
extension SecureBackupControllerMock {
|
||||
|
||||
Reference in New Issue
Block a user