Add labs flag and strings

This commit is contained in:
David Langley
2022-10-08 11:57:13 +01:00
parent 921df774a5
commit 7624d82310
9 changed files with 92 additions and 14 deletions
+20 -1
View File
@@ -174,7 +174,8 @@ typedef NS_ENUM(NSUInteger, LABS_ENABLE)
LABS_ENABLE_AUTO_REPORT_DECRYPTION_ERRORS,
LABS_ENABLE_LIVE_LOCATION_SHARING,
LABS_ENABLE_NEW_SESSION_MANAGER,
LABS_ENABLE_NEW_CLIENT_INFO_FEATURE
LABS_ENABLE_NEW_CLIENT_INFO_FEATURE,
LABS_ENABLE_WYSIWYG_COMPOSER
};
typedef NS_ENUM(NSUInteger, SECURITY)
@@ -599,6 +600,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
}
[sectionLabs addRowWithTag:LABS_ENABLE_NEW_SESSION_MANAGER];
[sectionLabs addRowWithTag:LABS_ENABLE_NEW_CLIENT_INFO_FEATURE];
[sectionLabs addRowWithTag:LABS_ENABLE_WYSIWYG_COMPOSER];
sectionLabs.headerTitle = [VectorL10n settingsLabs];
if (sectionLabs.hasAnyRows)
{
@@ -2558,6 +2560,18 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableNewClientInfoFeature:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
else if (row == LABS_ENABLE_WYSIWYG_COMPOSER)
{
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableWysiwygComposer];
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableWysiwygComposer;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableWysiwygComposerFeature:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
}
@@ -3322,6 +3336,11 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
MXSDKOptions.sharedInstance.enableNewClientInformationFeature = isEnabled;
}
- (void)toggleEnableWysiwygComposerFeature:(UISwitch *)sender
{
RiotSettings.shared.enableWysiwygComposer = sender.isOn;
}
- (void)togglePinRoomsWithMissedNotif:(UISwitch *)sender
{
RiotSettings.shared.pinRoomsWithMissedNotificationsOnHome = sender.isOn;