mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
merged element 1.8.10
This commit is contained in:
@@ -120,7 +120,7 @@ TableViewSectionsDelegate>
|
||||
@property (nonatomic, strong) SetPinCoordinatorBridgePresenter *setPinCoordinatorBridgePresenter;
|
||||
@property (nonatomic, strong) CrossSigningSetupCoordinatorBridgePresenter *crossSigningSetupCoordinatorBridgePresenter;
|
||||
|
||||
@property (nonatomic) AnalyticsScreenTimer *screenTimer;
|
||||
@property (nonatomic) AnalyticsScreenTracker *screenTracker;
|
||||
|
||||
@end
|
||||
|
||||
@@ -146,7 +146,7 @@ TableViewSectionsDelegate>
|
||||
self.enableBarTintColorStatusChange = NO;
|
||||
self.rageShakeManager = [RageShakeManager sharedManager];
|
||||
|
||||
self.screenTimer = [[AnalyticsScreenTimer alloc] initWithScreen:AnalyticsScreenSettingsSecurity];
|
||||
self.screenTracker = [[AnalyticsScreenTracker alloc] initWithScreen:AnalyticsScreenSettingsSecurity];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
@@ -255,6 +255,8 @@ TableViewSectionsDelegate>
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
[self.screenTracker trackScreen];
|
||||
|
||||
// Release the potential pushed view controller
|
||||
[self releasePushedViewController];
|
||||
|
||||
@@ -270,12 +272,6 @@ TableViewSectionsDelegate>
|
||||
[self loadCrossSigning];
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
[self.screenTimer start];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated
|
||||
{
|
||||
[super viewWillDisappear:animated];
|
||||
@@ -287,20 +283,14 @@ TableViewSectionsDelegate>
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated
|
||||
{
|
||||
[super viewDidDisappear:animated];
|
||||
[self.screenTimer stop];
|
||||
}
|
||||
|
||||
#pragma mark - Internal methods
|
||||
|
||||
- (void)updateSections
|
||||
{
|
||||
NSMutableArray<Section*> *sections = [NSMutableArray array];
|
||||
|
||||
BOOL isSecuredBackupRequired = [self.mainSession.homeserverWellknown backupRequired];
|
||||
|
||||
BOOL isSecureBackupRequired = self.mainSession.vc_homeserverConfiguration.encryption.isSecureBackupRequired;
|
||||
|
||||
// Pin code section
|
||||
|
||||
Section *pinCodeSection = [Section sectionWithTag:SECTION_PIN_CODE];
|
||||
@@ -354,14 +344,17 @@ TableViewSectionsDelegate>
|
||||
}
|
||||
|
||||
// Secure backup
|
||||
|
||||
Section *secureBackupSection = [Section sectionWithTag:SECTION_SECURE_BACKUP];
|
||||
secureBackupSection.headerTitle = [VectorL10n securitySettingsSecureBackup];
|
||||
secureBackupSection.footerTitle = VectorL10n.securitySettingsSecureBackupDescription;
|
||||
|
||||
[secureBackupSection addRowsWithCount:self->secureBackupSection.numberOfRows];
|
||||
|
||||
[sections addObject:secureBackupSection];
|
||||
|
||||
if (!isSecureBackupRequired)
|
||||
{
|
||||
Section *secureBackupSection = [Section sectionWithTag:SECTION_SECURE_BACKUP];
|
||||
secureBackupSection.headerTitle = [VectorL10n securitySettingsSecureBackup];
|
||||
secureBackupSection.footerTitle = VectorL10n.securitySettingsSecureBackupDescription;
|
||||
|
||||
[secureBackupSection addRowsWithCount:self->secureBackupSection.numberOfRows];
|
||||
|
||||
[sections addObject:secureBackupSection];
|
||||
}
|
||||
|
||||
// Cross-Signing
|
||||
|
||||
@@ -372,24 +365,24 @@ TableViewSectionsDelegate>
|
||||
|
||||
[sections addObject:crossSigningSection];
|
||||
|
||||
// Cryptograhpy
|
||||
// Cryptography
|
||||
|
||||
Section *cryptograhpySection = [Section sectionWithTag:SECTION_CRYPTOGRAPHY];
|
||||
cryptograhpySection.headerTitle = [VectorL10n securitySettingsCryptography];
|
||||
Section *cryptographySection = [Section sectionWithTag:SECTION_CRYPTOGRAPHY];
|
||||
cryptographySection.headerTitle = [VectorL10n securitySettingsCryptography];
|
||||
|
||||
if (RiotSettings.shared.settingsSecurityScreenShowCryptographyInfo)
|
||||
{
|
||||
[cryptograhpySection addRowWithTag:CRYPTOGRAPHY_INFO];
|
||||
[cryptographySection addRowWithTag:CRYPTOGRAPHY_INFO];
|
||||
}
|
||||
|
||||
if (RiotSettings.shared.settingsSecurityScreenShowCryptographyExport)
|
||||
if (RiotSettings.shared.settingsSecurityScreenShowCryptographyExport && !isSecureBackupRequired)
|
||||
{
|
||||
[cryptograhpySection addRowWithTag:CRYPTOGRAPHY_EXPORT];
|
||||
[cryptographySection addRowWithTag:CRYPTOGRAPHY_EXPORT];
|
||||
}
|
||||
|
||||
if (cryptograhpySection.rows.count)
|
||||
if (cryptographySection.rows.count)
|
||||
{
|
||||
[sections addObject:cryptograhpySection];
|
||||
[sections addObject:cryptographySection];
|
||||
}
|
||||
|
||||
#ifdef CROSS_SIGNING_AND_BACKUP_DEV
|
||||
@@ -831,9 +824,9 @@ TableViewSectionsDelegate>
|
||||
[self setupCrossSigning:nil];
|
||||
}]];
|
||||
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:nil]];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:nil]];
|
||||
|
||||
[self presentViewController:alertController animated:YES completion:nil];
|
||||
currentAlert = alertController;
|
||||
@@ -1099,19 +1092,19 @@ TableViewSectionsDelegate>
|
||||
{
|
||||
if ([deviceId isEqualToString:self.mainSession.myDeviceId])
|
||||
{
|
||||
return [UIImage imageNamed:@"encryption_warning"];
|
||||
return AssetImages.encryptionWarning.image;
|
||||
}
|
||||
else
|
||||
{
|
||||
return [UIImage imageNamed:@"encryption_normal"];
|
||||
return AssetImages.encryptionNormal.image;
|
||||
}
|
||||
}
|
||||
|
||||
UIImage* shieldImageForDevice = [UIImage imageNamed:@"encryption_warning"];
|
||||
UIImage* shieldImageForDevice = AssetImages.encryptionWarning.image;
|
||||
MXDeviceInfo *device = [self.mainSession.crypto deviceWithDeviceId:deviceId ofUser:self.mainSession.myUser.userId];
|
||||
if (device.trustLevel.isVerified)
|
||||
{
|
||||
shieldImageForDevice = [UIImage imageNamed:@"encryption_trusted"];
|
||||
shieldImageForDevice = AssetImages.encryptionTrusted.image;
|
||||
}
|
||||
|
||||
return shieldImageForDevice;
|
||||
@@ -1418,11 +1411,11 @@ TableViewSectionsDelegate>
|
||||
message:[VectorL10n securitySettingsCompleteSecurityAlertMessage]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[self presentCompleteSecurity];
|
||||
}]];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[self presentCompleteSecurity];
|
||||
}]];
|
||||
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:[VectorL10n later]
|
||||
style:UIAlertActionStyleCancel
|
||||
@@ -1614,7 +1607,7 @@ TableViewSectionsDelegate>
|
||||
message:[VectorL10n settingsKeyBackupDeleteConfirmationPromptMsg]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:^(UIAlertAction * action) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
@@ -1743,7 +1736,7 @@ TableViewSectionsDelegate>
|
||||
message:[VectorL10n settingsKeyBackupDeleteConfirmationPromptMsg]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:^(UIAlertAction * action) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
Reference in New Issue
Block a user