mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 17:42:45 +02:00
MESSENGER-5203 add federation to lab settings and refactor
This commit is contained in:
@@ -234,7 +234,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_FEDERATION
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, SECURITY)
|
||||
@@ -828,6 +829,10 @@ SSOAuthenticationPresenterDelegate>
|
||||
{
|
||||
[sectionLabs addRowWithTag:LABS_ENABLE_VOICE_BROADCAST];
|
||||
*/
|
||||
|
||||
// bwi: #5203 add federation feature
|
||||
[sectionLabs addRowWithTag:LABS_ENABLE_FEDERATION];
|
||||
|
||||
sectionLabs.headerTitle = [VectorL10n settingsLabs];
|
||||
if (sectionLabs.hasAnyRows)
|
||||
{
|
||||
@@ -3033,6 +3038,20 @@ SSOAuthenticationPresenterDelegate>
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
// bwi: #5203 add federation feature
|
||||
else if (row == LABS_ENABLE_FEDERATION)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = [BWIL10n bwiSettingsLabsFederationFeature];
|
||||
labelAndSwitchCell.mxkSwitch.on = BWIBuildSettings.shared.isFederationEnabled;
|
||||
labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableFederationFeature:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
|
||||
else if (row == LABS_ENABLE_VOICE_BROADCAST)
|
||||
{
|
||||
@@ -3974,6 +3993,12 @@ SSOAuthenticationPresenterDelegate>
|
||||
RiotSettings.shared.roomScreenUseOnlyLatestUserAvatarAndName = sender.isOn;
|
||||
}
|
||||
|
||||
// bwi: #5203 add federation feature
|
||||
- (void)toggleEnableFederationFeature:(UISwitch *)sender
|
||||
{
|
||||
BWIBuildSettings.shared.isFederationEnabled = sender.isOn;
|
||||
}
|
||||
|
||||
- (void)markAllAsRead:(id)sender
|
||||
{
|
||||
// Feedback: disable button and run activity indicator
|
||||
|
||||
Reference in New Issue
Block a user