mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
Merge commit '3d672a05b2a7117ade2e4e87bd2b5762063d7922' into feature/3977_merge_element_1_9_13
# Conflicts: # Config/AppVersion.xcconfig # Podfile.lock # Riot/Modules/Application/LegacyAppDelegate.m # Riot/Modules/Authentication/AuthenticationCoordinator.swift # Riot/Modules/Authentication/Legacy/LegacyAuthenticationCoordinator.swift # Riot/Modules/LaunchLoading/LaunchLoadingView.swift # Riot/Modules/LaunchLoading/LaunchLoadingView.xib # Riot/Modules/MatrixKit/Models/Account/MXKAccount.m # Riot/Modules/MatrixKit/Models/Room/MXKRoomBubbleCellData.m # Riot/Modules/Room/TimelineCells/Styles/Bubble/BubbleRoomTimelineCellProvider.m # Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m # Riot/Modules/TabBar/MasterTabBarController.m # fastlane/Fastfile
This commit is contained in:
+35
-4
@@ -140,8 +140,20 @@ private enum BackupRows {
|
||||
.info(text: infoText),
|
||||
.createSecureBackupAction
|
||||
]
|
||||
case .keyBackup(let keyBackupVersion, _, _),
|
||||
.keyBackupNotTrusted(let keyBackupVersion, _): // Manage the key backup in the same way for the moment
|
||||
case .keyBackup(let keyBackupVersion, _, let progress):
|
||||
if let progress = progress {
|
||||
backupRows = [
|
||||
.info(text: importProgressText(for: progress)),
|
||||
.deleteKeyBackupAction(keyBackupVersion: keyBackupVersion)
|
||||
]
|
||||
} else {
|
||||
backupRows = [
|
||||
.info(text: VectorL10n.securitySettingsSecureBackupInfoValid),
|
||||
.restoreFromKeyBackupAction(keyBackupVersion: keyBackupVersion, title: VectorL10n.securitySettingsSecureBackupRestore),
|
||||
.deleteKeyBackupAction(keyBackupVersion: keyBackupVersion)
|
||||
]
|
||||
}
|
||||
case .keyBackupNotTrusted(let keyBackupVersion, _):
|
||||
backupRows = [
|
||||
.info(text: VectorL10n.securitySettingsSecureBackupInfoValid),
|
||||
.restoreFromKeyBackupAction(keyBackupVersion: keyBackupVersion, title: VectorL10n.securitySettingsSecureBackupRestore),
|
||||
@@ -160,8 +172,22 @@ private enum BackupRows {
|
||||
.createKeyBackupAction,
|
||||
.resetSecureBackupAction
|
||||
]
|
||||
case .keyBackup(let keyBackupVersion, _, _),
|
||||
.keyBackupNotTrusted(let keyBackupVersion, _): // Manage the key backup in the same way for the moment
|
||||
case .keyBackup(let keyBackupVersion, _, let progress):
|
||||
if let progress = progress {
|
||||
backupRows = [
|
||||
.info(text: importProgressText(for: progress)),
|
||||
.deleteKeyBackupAction(keyBackupVersion: keyBackupVersion),
|
||||
.resetSecureBackupAction
|
||||
]
|
||||
} else {
|
||||
backupRows = [
|
||||
.info(text: VectorL10n.securitySettingsSecureBackupInfoValid),
|
||||
.restoreFromKeyBackupAction(keyBackupVersion: keyBackupVersion, title: VectorL10n.securitySettingsSecureBackupRestore),
|
||||
.deleteKeyBackupAction(keyBackupVersion: keyBackupVersion),
|
||||
.resetSecureBackupAction
|
||||
]
|
||||
}
|
||||
case .keyBackupNotTrusted(let keyBackupVersion, _):
|
||||
backupRows = [
|
||||
.info(text: VectorL10n.securitySettingsSecureBackupInfoValid),
|
||||
.restoreFromKeyBackupAction(keyBackupVersion: keyBackupVersion, title: VectorL10n.securitySettingsSecureBackupRestore),
|
||||
@@ -172,6 +198,11 @@ private enum BackupRows {
|
||||
}
|
||||
self.backupRows = backupRows
|
||||
}
|
||||
|
||||
private func importProgressText(for progress: Progress) -> String {
|
||||
let percentage = Int(round(progress.fractionCompleted * 100))
|
||||
return VectorL10n.keyBackupRecoverFromPrivateKeyInfo + " \(percentage)%"
|
||||
}
|
||||
|
||||
// MARK: - Cells -
|
||||
|
||||
|
||||
Reference in New Issue
Block a user