diff --git a/Riot/Modules/KeyBackup/Setup/KeyBackupSetupCoordinator.swift b/Riot/Modules/KeyBackup/Setup/KeyBackupSetupCoordinator.swift index 432e438c7..1d6861d4e 100644 --- a/Riot/Modules/KeyBackup/Setup/KeyBackupSetupCoordinator.swift +++ b/Riot/Modules/KeyBackup/Setup/KeyBackupSetupCoordinator.swift @@ -16,11 +16,6 @@ import UIKit -@objc protocol KeyBackupSetupCoordinatorDelegate: class { - func keyBackupSetupCoordinatorDidCancel(_ keyBackupSetupCoordinator: KeyBackupSetupCoordinator) - func keyBackupSetupCoordinatorDidSetupRecoveryKey(_ keyBackupSetupCoordinator: KeyBackupSetupCoordinator) -} - @objcMembers final class KeyBackupSetupCoordinator: NSObject, KeyBackupSetupCoordinatorType { diff --git a/Riot/Modules/KeyBackup/Setup/KeyBackupSetupCoordinatorType.swift b/Riot/Modules/KeyBackup/Setup/KeyBackupSetupCoordinatorType.swift index f3c32dd5a..8725511a7 100644 --- a/Riot/Modules/KeyBackup/Setup/KeyBackupSetupCoordinatorType.swift +++ b/Riot/Modules/KeyBackup/Setup/KeyBackupSetupCoordinatorType.swift @@ -16,6 +16,12 @@ import Foundation +@objc protocol KeyBackupSetupCoordinatorDelegate: class { + func keyBackupSetupCoordinatorDidCancel(_ keyBackupSetupCoordinator: KeyBackupSetupCoordinator) + func keyBackupSetupCoordinatorDidSetupRecoveryKey(_ keyBackupSetupCoordinator: KeyBackupSetupCoordinator) +} + /// `KeyBackupSetupCoordinatorType` is a protocol describing a Coordinator that handle keybackup setup navigation flow. protocol KeyBackupSetupCoordinatorType: Coordinator, Presentable { + var delegate: KeyBackupSetupCoordinatorDelegate? { get } } diff --git a/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseCoordinator.swift b/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseCoordinator.swift index c00b9b7a4..9b2d74f13 100644 --- a/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseCoordinator.swift +++ b/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseCoordinator.swift @@ -17,11 +17,6 @@ import Foundation import UIKit -protocol KeyBackupSetupPassphraseCoordinatorDelegate: class { - func keyBackupSetupPassphraseCoordinator(_ keyBackupSetupPassphraseCoordinator: KeyBackupSetupPassphraseCoordinator, didCompleteWithMegolmBackupCreationInfo megolmBackupCreationInfo: MXMegolmBackupCreationInfo) - func keyBackupSetupPassphraseCoordinatorDidCancel(_ keyBackupSetupPassphraseCoordinator: KeyBackupSetupPassphraseCoordinator) -} - final class KeyBackupSetupPassphraseCoordinator: KeyBackupSetupPassphraseCoordinatorType { // MARK: - Properties diff --git a/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseCoordinatorType.swift b/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseCoordinatorType.swift index f163f7af3..25dc75606 100644 --- a/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseCoordinatorType.swift +++ b/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseCoordinatorType.swift @@ -16,6 +16,12 @@ import Foundation +protocol KeyBackupSetupPassphraseCoordinatorDelegate: class { + func keyBackupSetupPassphraseCoordinator(_ keyBackupSetupPassphraseCoordinator: KeyBackupSetupPassphraseCoordinator, didCompleteWithMegolmBackupCreationInfo megolmBackupCreationInfo: MXMegolmBackupCreationInfo) + func keyBackupSetupPassphraseCoordinatorDidCancel(_ keyBackupSetupPassphraseCoordinator: KeyBackupSetupPassphraseCoordinator) +} + /// `KeyBackupSetupPassphraseCoordinatorType` is a protocol describing a Coordinator that handle key backup setup passphrase navigation flow. protocol KeyBackupSetupPassphraseCoordinatorType: Coordinator, Presentable { + var delegate: KeyBackupSetupPassphraseCoordinatorDelegate? { get } } diff --git a/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyCoordinator.swift b/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyCoordinator.swift index 74c95266b..fdc2104b2 100644 --- a/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyCoordinator.swift +++ b/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyCoordinator.swift @@ -17,11 +17,6 @@ import Foundation import UIKit -protocol KeyBackupSetupRecoveryKeyCoordinatorDelegate: class { - func keyBackupSetupRecoveryKeyCoordinatorDidCreateBackup(_ keyBackupSetupRecoveryKeyCoordinator: KeyBackupSetupRecoveryKeyCoordinatorType) - func keyBackupSetupRecoveryKeyCoordinatorDidCancel(_ keyBackupSetupRecoveryKeyCoordinator: KeyBackupSetupRecoveryKeyCoordinatorType) -} - final class KeyBackupSetupRecoveryKeyCoordinator: KeyBackupSetupRecoveryKeyCoordinatorType { // MARK: - Properties diff --git a/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyCoordinatorType.swift b/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyCoordinatorType.swift index 42a08cc63..459f5ab3f 100644 --- a/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyCoordinatorType.swift +++ b/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyCoordinatorType.swift @@ -16,6 +16,12 @@ import Foundation +protocol KeyBackupSetupRecoveryKeyCoordinatorDelegate: class { + func keyBackupSetupRecoveryKeyCoordinatorDidCreateBackup(_ keyBackupSetupRecoveryKeyCoordinator: KeyBackupSetupRecoveryKeyCoordinatorType) + func keyBackupSetupRecoveryKeyCoordinatorDidCancel(_ keyBackupSetupRecoveryKeyCoordinator: KeyBackupSetupRecoveryKeyCoordinatorType) +} + /// `KeyBackupSetupRecoveryKeyCoordinatorType` is a protocol describing a Coordinator that handle key backup setup recovery key navigation flow. protocol KeyBackupSetupRecoveryKeyCoordinatorType: Coordinator, Presentable { + var delegate: KeyBackupSetupRecoveryKeyCoordinatorDelegate? { get } }