LABS: Remove reaction settings, reactions are enabled by default.

This commit is contained in:
SBiOSoftWhare
2019-07-09 13:51:14 +02:00
parent e838149a42
commit 83c143f28d
4 changed files with 3 additions and 42 deletions
+1 -31
View File
@@ -120,7 +120,6 @@ enum
{
LABS_USE_ROOM_MEMBERS_LAZY_LOADING_INDEX = 0,
LABS_USE_JITSI_WIDGET_INDEX,
LABS_USE_MESSAGE_REACTION_INDEX,
LABS_CRYPTO_INDEX,
LABS_COUNT
};
@@ -2136,20 +2135,7 @@ SignOutAlertPresenterDelegate>
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleJitsiForConference:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
else if (row == LABS_USE_MESSAGE_REACTION_INDEX)
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_labs_message_reaction", @"Vector", nil);
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.messageReaction;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
labelAndSwitchCell.mxkSwitch.enabled = YES;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleMessageReaction:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
}
else if (row == LABS_CRYPTO_INDEX)
{
MXSession* session = [AppDelegate theDelegate].mxSessions[0];
@@ -3049,22 +3035,6 @@ SignOutAlertPresenterDelegate>
}
}
- (void)toggleMessageReaction:(id)sender
{
if (sender && [sender isKindOfClass:UISwitch.class])
{
UISwitch *switchButton = (UISwitch*)sender;
RiotSettings.shared.messageReaction = switchButton.isOn;
// Reset cached room data sources
MXKRoomDataSourceManager *roomDataSourceManager = [MXKRoomDataSourceManager sharedManagerForMatrixSession:self.mainSession];
[roomDataSourceManager reset];
[self.tableView reloadData];
}
}
- (void)toggleLabsEndToEndEncryption:(id)sender
{
if (sender && [sender isKindOfClass:UISwitch.class])