mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
vector-im/element-ios/issues/5114 - Polls in the timeline.
This commit is contained in:
@@ -153,9 +153,10 @@ enum
|
||||
ABOUT_THIRD_PARTY_INDEX,
|
||||
};
|
||||
|
||||
enum
|
||||
typedef NS_ENUM(NSUInteger, LABS_ENABLE)
|
||||
{
|
||||
LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX = 0
|
||||
LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX,
|
||||
LABS_ENABLE_POLLS
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -551,6 +552,8 @@ TableViewSectionsDelegate>
|
||||
{
|
||||
Section *sectionLabs = [Section sectionWithTag:SECTION_TAG_LABS];
|
||||
[sectionLabs addRowWithTag:LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX];
|
||||
[sectionLabs addRowWithTag:LABS_ENABLE_POLLS];
|
||||
|
||||
sectionLabs.headerTitle = [VectorL10n settingsLabs];
|
||||
if (sectionLabs.hasAnyRows)
|
||||
{
|
||||
@@ -2401,6 +2404,19 @@ TableViewSectionsDelegate>
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
|
||||
if (row == LABS_ENABLE_POLLS && BuildSettings.pollsEnabled)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnabledPolls];
|
||||
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenAllowPollsAction;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnablePolls:) forControlEvents:UIControlEventValueChanged];
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_TAG_FLAIR)
|
||||
{
|
||||
@@ -3135,6 +3151,11 @@ TableViewSectionsDelegate>
|
||||
RiotSettings.shared.enableRingingForGroupCalls = sender.isOn;
|
||||
}
|
||||
|
||||
- (void)toggleEnablePolls:(UISwitch *)sender
|
||||
{
|
||||
RiotSettings.shared.roomScreenAllowPollsAction = sender.isOn;
|
||||
}
|
||||
|
||||
- (void)togglePinRoomsWithMissedNotif:(UISwitch *)sender
|
||||
{
|
||||
RiotSettings.shared.pinRoomsWithMissedNotificationsOnHome = sender.isOn;
|
||||
|
||||
Reference in New Issue
Block a user