mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Feature/4889 deactivate rust for prod
This commit is contained in:
committed by
Frank Rotermund
parent
fe6f9c5fb7
commit
a22c234e82
@@ -232,7 +232,8 @@ 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_VOICE_BROADCAST,
|
||||
LABS_ENABLE_CRYPTO_SDK
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, SECURITY)
|
||||
@@ -764,6 +765,11 @@ 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];
|
||||
@@ -2970,6 +2976,18 @@ 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;
|
||||
}
|
||||
}
|
||||
@@ -3861,6 +3879,30 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user