Skip to content

Commit

Permalink
Merge pull request #1127 from tchapgouv/1125-l-activation-de-la-sauve…
Browse files Browse the repository at this point in the history
…garde-automatique-crash-depuis-au-moins-la-v281

1125 l activation de la sauvegarde automatique crash depuis au moins la v281
  • Loading branch information
NicolasBuquet authored Nov 26, 2024
2 parents 5a06691 + 1e264ce commit 97f3235
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,25 @@ private enum BackupRows {
]
}
case .keyBackupNotTrusted(let keyBackupVersion, _):
// Tchap: if backup is not trusted, treats it as if no backup is present (like on Android)
// backupRows = [
// .info(text: VectorL10n.securitySettingsSecureBackupInfoValid, icon: UIImage(systemName: "checkmark.circle.fill"), tint: .systemGreen),
// .restoreFromKeyBackupAction(keyBackupVersion: keyBackupVersion, title: VectorL10n.securitySettingsSecureBackupRestore),
// .deleteKeyBackupAction(keyBackupVersion: keyBackupVersion)
// ]
let noBackup = VectorL10n.settingsKeyBackupInfoNotValid

backupRows = [
.info(text: VectorL10n.securitySettingsSecureBackupInfoValid, icon: UIImage(systemName: "checkmark.circle.fill"), tint: .systemGreen),
.restoreFromKeyBackupAction(keyBackupVersion: keyBackupVersion, title: VectorL10n.securitySettingsSecureBackupRestore),
// .deleteKeyBackupAction(keyBackupVersion: keyBackupVersion) // Tchap : no more "Delete backup" button
.info(text: noBackup, icon: UIImage(systemName: "xmark.circle.fill"), tint: .systemGray),
.createSecureBackupAction
]
}
case .secureBackup(let keyBackupState):
switch keyBackupState {
case .noKeyBackup:
let noBackup = VectorL10n.settingsKeyBackupInfoNone
let signoutWarning = VectorL10n.settingsKeyBackupInfoSignoutWarning
// Tchap
// let signoutWarning = VectorL10n.settingsKeyBackupInfoSignoutWarning
// let infoText = [noBackup, signoutWarning].joined(separator: "\n")
let infoText = noBackup

Expand Down
4 changes: 3 additions & 1 deletion Riot/Modules/Settings/Security/SecurityViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,8 @@ - (NSInteger)numberOfRowsInCrossSigningSection
numberOfRowsInCrossSigningSection = CROSSSIGNING_FIRST_ACTION + 1;
break;
case MXCrossSigningStateCrossSigningExists: // Actions: Verify this session, Reset
numberOfRowsInCrossSigningSection = CROSSSIGNING_FIRST_ACTION + 2;
break;
case MXCrossSigningStateTrustCrossSigning: // Actions: Request keys, Reset
numberOfRowsInCrossSigningSection = CROSSSIGNING_FIRST_ACTION + 1;
break;
Expand All @@ -707,7 +709,7 @@ - (NSAttributedString*)crossSigningInformation
crossSigningInformation = [VectorL10n securitySettingsCrosssigningInfoNotBootstrapped];
break;
case MXCrossSigningStateCrossSigningExists:
crossSigningInformation = [VectorL10n securitySettingsCrosssigningInfoNotBootstrapped]; // Tchap : simply tell user cross-signing is not configured.
crossSigningInformation = [VectorL10n securitySettingsCrosssigningInfoExists]; // Tchap : tell user cross-signing exists on the account but is not trusted.
break;
case MXCrossSigningStateTrustCrossSigning:
crossSigningInformation = [VectorL10n securitySettingsCrosssigningInfoTrusted];
Expand Down
1 change: 1 addition & 0 deletions changelog.d/1125.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Amélioration de la description de l'état de la signature croisée et des actions possibles (pour être au même niveau que le client Tchap Android).

0 comments on commit 97f3235

Please sign in to comment.