mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
Introduce enableRingingForGroupCalls and add a labs setting for it
This commit is contained in:
@@ -140,6 +140,11 @@ enum
|
||||
OTHER_REPORT_BUG_INDEX,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX = 0
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SECURITY_BUTTON_INDEX = 0,
|
||||
@@ -475,6 +480,7 @@ TableViewSectionsDelegate>
|
||||
if (BuildSettings.settingsScreenShowLabSettings)
|
||||
{
|
||||
Section *sectionLabs = [Section sectionWithTag:SECTION_TAG_LABS];
|
||||
[sectionLabs addRowWithTag:LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX];
|
||||
sectionLabs.headerTitle = NSLocalizedStringFromTable(@"settings_labs", @"Vector", nil);
|
||||
if (sectionLabs.hasAnyRows)
|
||||
{
|
||||
@@ -2241,7 +2247,18 @@ TableViewSectionsDelegate>
|
||||
}
|
||||
else if (section == SECTION_TAG_LABS)
|
||||
{
|
||||
|
||||
if (row == LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_labs_enable_ringing_for_group_calls", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableRingingForGroupCalls;
|
||||
labelAndSwitchCell.mxkSwitch.tintColor = ThemeService.shared.theme.tintColor;
|
||||
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableRingingForGroupCalls:) forControlEvents:UIControlEventValueChanged];
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_TAG_FLAIR)
|
||||
{
|
||||
@@ -2930,6 +2947,16 @@ TableViewSectionsDelegate>
|
||||
}
|
||||
}
|
||||
|
||||
- (void)toggleEnableRingingForGroupCalls:(UISwitch *)sender
|
||||
{
|
||||
if (sender)
|
||||
{
|
||||
RiotSettings.shared.enableRingingForGroupCalls = sender.isOn;
|
||||
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)togglePinRoomsWithMissedNotif:(id)sender
|
||||
{
|
||||
UISwitch *switchButton = (UISwitch*)sender;
|
||||
|
||||
Reference in New Issue
Block a user