MESSENGER-5148 Restore Backup option

This commit is contained in:
Frank Rotermund
2023-11-14 12:56:34 +01:00
parent d1942c3884
commit b255b67f86
7 changed files with 56 additions and 36 deletions
@@ -326,16 +326,7 @@ TableViewSectionsDelegate>
}
[sections addObject:pinCodeSection];
// BWI: if tracking is enabled show switch to turn it on/off
if (BWIBuildSettings.shared.bwiMatomoEnabled) {
Section *analyticsSection = [Section sectionWithTag:SECTION_ANALYTICS];
[analyticsSection addRowWithTag:ANALYTICS_ENABLED];
analyticsSection.headerTitle = BWIL10n.bwiSettingsAnalyticsSectionHeader;
analyticsSection.footerTitle = BWIL10n.bwiSettingsAnalyticsSectionFooter;
[sections addObject:analyticsSection];
}
// Crypto sessions section
if (RiotSettings.shared.settingsSecurityScreenShowSessions && !RiotSettings.shared.enableNewSessionManager && !BWIBuildSettings.shared.enableNewSessionManagerByDefault)
{
@@ -360,17 +351,31 @@ TableViewSectionsDelegate>
// Secure backup
if (!isSecureBackupRequired)
// bwi 5184: Show on featureflag and only when device has a private key otherwise there will be errors in the process
// Devices in our case should private keys
if ((!isSecureBackupRequired || BWIBuildSettings.shared.enableRestoreKeysFromBackup) && self.mainSession.crypto.backup.hasPrivateKeyInCryptoStore)
{
Section *secureBackupSection = [Section sectionWithTag:SECTION_SECURE_BACKUP];
secureBackupSection.headerTitle = [VectorL10n securitySettingsSecureBackup];
secureBackupSection.footerTitle = VectorL10n.securitySettingsSecureBackupDescription;
secureBackupSection.headerTitle = [BWIL10n securitySettingsSecureBackup];
if (!BWIBuildSettings.shared.enableRestoreKeysFromBackup) {
secureBackupSection.footerTitle = VectorL10n.securitySettingsSecureBackupDescription;
}
[secureBackupSection addRowsWithCount:self->secureBackupSection.numberOfRows];
[sections addObject:secureBackupSection];
}
// BWI: if tracking is enabled show switch to turn it on/off
if (BWIBuildSettings.shared.bwiMatomoEnabled) {
Section *analyticsSection = [Section sectionWithTag:SECTION_ANALYTICS];
[analyticsSection addRowWithTag:ANALYTICS_ENABLED];
analyticsSection.headerTitle = BWIL10n.bwiSettingsAnalyticsSectionHeader;
analyticsSection.footerTitle = BWIL10n.bwiSettingsAnalyticsSectionFooter;
[sections addObject:analyticsSection];
}
// Cross-Signing
// bwi: hide cross signing section