mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Settings: Add enable room message bubbles parameter.
This commit is contained in:
@@ -127,7 +127,8 @@ enum {
|
||||
enum
|
||||
{
|
||||
USER_INTERFACE_LANGUAGE_INDEX = 0,
|
||||
USER_INTERFACE_THEME_INDEX
|
||||
USER_INTERFACE_THEME_INDEX,
|
||||
USER_INTERFACE_TIMELINE_STYLE_INDEX
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -499,9 +500,16 @@ TableViewSectionsDelegate>
|
||||
}
|
||||
|
||||
Section *sectionUserInterface = [Section sectionWithTag:SECTION_TAG_USER_INTERFACE];
|
||||
sectionUserInterface.headerTitle = [VectorL10n settingsUserInterface];
|
||||
|
||||
[sectionUserInterface addRowWithTag:USER_INTERFACE_LANGUAGE_INDEX];
|
||||
[sectionUserInterface addRowWithTag:USER_INTERFACE_THEME_INDEX];
|
||||
sectionUserInterface.headerTitle = [VectorL10n settingsUserInterface];
|
||||
|
||||
if (BuildSettings.roomScreenAllowTimelineStyleConfiguration)
|
||||
{
|
||||
[sectionUserInterface addRowWithTag:USER_INTERFACE_TIMELINE_STYLE_INDEX];
|
||||
}
|
||||
|
||||
[tmpSections addObject: sectionUserInterface];
|
||||
|
||||
Section *sectionAdvanced = [Section sectionWithTag:SECTION_TAG_ADVANCED];
|
||||
@@ -2196,6 +2204,19 @@ TableViewSectionsDelegate>
|
||||
[cell vc_setAccessoryDisclosureIndicatorWithCurrentTheme];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleDefault;
|
||||
}
|
||||
else if (row == USER_INTERFACE_TIMELINE_STYLE_INDEX)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsEnableRoomMessageBubbles];
|
||||
|
||||
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenEnableMessageBubbles;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableRoomMessageBubbles:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_TAG_IGNORED_USERS)
|
||||
{
|
||||
@@ -3839,6 +3860,11 @@ TableViewSectionsDelegate>
|
||||
RiotSettings.shared.showNSFWPublicRooms = sender.isOn;
|
||||
}
|
||||
|
||||
- (void)toggleEnableRoomMessageBubbles:(UISwitch *)sender
|
||||
{
|
||||
RiotSettings.shared.roomScreenEnableMessageBubbles = sender.isOn;
|
||||
}
|
||||
|
||||
#pragma mark - TextField listener
|
||||
|
||||
- (IBAction)textFieldDidChange:(id)sender
|
||||
|
||||
Reference in New Issue
Block a user