revert '5bc3255dfe7b0a56aa3ce4b8056015b438653fed' 4889_deactivate_rust_for_prod

This commit is contained in:
JanNiklas Grabowski
2023-07-17 08:54:43 +00:00
parent db1787303c
commit 485f944c6c
26 changed files with 36 additions and 888 deletions
+1 -43
View File
@@ -232,8 +232,7 @@ typedef NS_ENUM(NSUInteger, LABS_ENABLE)
LABS_ENABLE_NEW_SESSION_MANAGER,
LABS_ENABLE_NEW_CLIENT_INFO_FEATURE,
LABS_ENABLE_WYSIWYG_COMPOSER,
LABS_ENABLE_VOICE_BROADCAST,
LABS_ENABLE_CRYPTO_SDK
LABS_ENABLE_VOICE_BROADCAST
};
typedef NS_ENUM(NSUInteger, SECURITY)
@@ -765,11 +764,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
[sectionLabs addRowWithTag:LABS_ENABLE_NEW_SESSION_MANAGER];
}
/* bwi: disabled for our apps
if ([CryptoSDKFeature.shared canManuallyEnableForUserId:self.mainSession.myUserId])
{
[sectionLabs addRowWithTag:LABS_ENABLE_CRYPTO_SDK];
}
[sectionLabs addRowWithTag:LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX];
[sectionLabs addRowWithTag:LABS_ENABLE_THREADS_INDEX];
[sectionLabs addRowWithTag:LABS_ENABLE_AUTO_REPORT_DECRYPTION_ERRORS];
@@ -2976,18 +2970,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableVoiceBroadcastFeature:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
else if (row == LABS_ENABLE_CRYPTO_SDK)
{
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
BOOL isEnabled = MXSDKOptions.sharedInstance.enableCryptoSDK;
labelAndSwitchCell.mxkLabel.text = isEnabled ? VectorL10n.settingsLabsDisableCryptoSdk : VectorL10n.settingsLabsEnableCryptoSdk;
labelAndSwitchCell.mxkSwitch.on = isEnabled;
[labelAndSwitchCell.mxkSwitch setEnabled:!isEnabled];
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(enableCryptoSDKFeature:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
}
@@ -3879,30 +3861,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
RiotSettings.shared.enableVoiceBroadcast = sender.isOn;
}
- (void)enableCryptoSDKFeature:(UISwitch *)sender
{
[currentAlert dismissViewControllerAnimated:NO completion:nil];
UIAlertController *confirmationAlert = [UIAlertController alertControllerWithTitle:VectorL10n.settingsLabsEnableCryptoSdk
message:VectorL10n.settingsLabsConfirmCryptoSdk
preferredStyle:UIAlertControllerStyleAlert];
MXWeakify(self);
[confirmationAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel] style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
self->currentAlert = nil;
[sender setOn:NO animated:YES];
}]];
[confirmationAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n continue] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[CryptoSDKFeature.shared enable];
[[AppDelegate theDelegate] reloadMatrixSessions:YES];
}]];
[self presentViewController:confirmationAlert animated:YES completion:nil];
currentAlert = confirmationAlert;
}
- (void)togglePinRoomsWithMissedNotif:(UISwitch *)sender
{
RiotSettings.shared.pinRoomsWithMissedNotificationsOnHome = sender.isOn;