mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Merge pull request #5342 from vector-im/steve/5321_bubbles_lauching
Message bubbles: Add settings and build flag
This commit is contained in:
@@ -134,7 +134,8 @@ typedef NS_ENUM(NSUInteger, LOCAL_CONTACTS)
|
||||
typedef NS_ENUM(NSUInteger, USER_INTERFACE)
|
||||
{
|
||||
USER_INTERFACE_LANGUAGE_INDEX = 0,
|
||||
USER_INTERFACE_THEME_INDEX
|
||||
USER_INTERFACE_THEME_INDEX,
|
||||
USER_INTERFACE_TIMELINE_STYLE_INDEX
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IDENTITY_SERVER)
|
||||
@@ -514,9 +515,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];
|
||||
@@ -2226,6 +2234,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)
|
||||
{
|
||||
@@ -3874,6 +3895,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