mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 10:02:46 +02:00
Add a setting to hide/display redaction placeholders
This commit is contained in:
@@ -130,7 +130,8 @@ typedef NS_ENUM(NSUInteger, USER_INTERFACE)
|
||||
{
|
||||
USER_INTERFACE_LANGUAGE_INDEX = 0,
|
||||
USER_INTERFACE_THEME_INDEX,
|
||||
USER_INTERFACE_TIMELINE_STYLE_INDEX
|
||||
USER_INTERFACE_TIMELINE_STYLE_INDEX,
|
||||
USER_INTERFACE_SHOW_REDACTIONS_IN_ROOM_HISTORY
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IDENTITY_SERVER)
|
||||
@@ -518,6 +519,8 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
|
||||
|
||||
// [sectionUserInterface addRowWithTag:USER_INTERFACE_TIMELINE_STYLE_INDEX];
|
||||
}
|
||||
|
||||
[sectionUserInterface addRowWithTag:USER_INTERFACE_SHOW_REDACTIONS_IN_ROOM_HISTORY];
|
||||
|
||||
[tmpSections addObject: sectionUserInterface];
|
||||
|
||||
@@ -2264,6 +2267,19 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
|
||||
{
|
||||
cell = [self buildMessageBubblesCellForTableView:tableView atIndexPath:indexPath];
|
||||
}
|
||||
else if (row == USER_INTERFACE_SHOW_REDACTIONS_IN_ROOM_HISTORY)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = VectorL10n.settingsUiShowRedactionsInRoomHistory;
|
||||
|
||||
labelAndSwitchCell.mxkSwitch.on = [MXKAppSettings standardAppSettings].showRedactionsInRoomHistory;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleShowRedacted:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_TAG_IGNORED_USERS)
|
||||
{
|
||||
@@ -3974,6 +3990,11 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
|
||||
self.deactivateAccountViewController = deactivateAccountViewController;
|
||||
}
|
||||
|
||||
- (void)toggleShowRedacted:(UISwitch *)sender
|
||||
{
|
||||
[MXKAppSettings standardAppSettings].showRedactionsInRoomHistory = sender.isOn;
|
||||
}
|
||||
|
||||
- (void)togglePresenceOfflineMode:(UISwitch *)sender
|
||||
{
|
||||
MXKAccount *account = MXKAccountManager.sharedManager.accounts.firstObject;
|
||||
|
||||
Reference in New Issue
Block a user