Matrix Apps: Enable them by default. Remove the settings from LABS section (#1795)

This commit is contained in:
manuroe
2018-03-08 15:39:59 +01:00
parent 4690cf8179
commit 5cc9b35462
11 changed files with 2 additions and 37 deletions
+2 -27
View File
@@ -112,8 +112,7 @@ enum
enum
{
LABS_MATRIX_APPS_INDEX = 0,
LABS_USE_JITSI_WIDGET_INDEX,
LABS_USE_JITSI_WIDGET_INDEX = 0,
LABS_CRYPTO_INDEX,
LABS_COUNT
};
@@ -2024,18 +2023,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
}
else if (section == SETTINGS_SECTION_LABS_INDEX)
{
if (row == LABS_MATRIX_APPS_INDEX)
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_labs_matrix_apps", @"Vector", nil);
labelAndSwitchCell.mxkSwitch.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"matrixApps"];
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleLabsMatrixApps:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
else if (row == LABS_USE_JITSI_WIDGET_INDEX)
if (row == LABS_USE_JITSI_WIDGET_INDEX)
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
@@ -2881,19 +2869,6 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
}
}
- (void)toggleLabsMatrixApps:(id)sender
{
if (sender && [sender isKindOfClass:UISwitch.class])
{
UISwitch *switchButton = (UISwitch*)sender;
[[NSUserDefaults standardUserDefaults] setBool:switchButton.isOn forKey:@"matrixApps"];
[[NSUserDefaults standardUserDefaults] synchronize];
[self.tableView reloadData];
}
}
- (void)toggleJitsiForConference:(id)sender
{
if (sender && [sender isKindOfClass:UISwitch.class])