Remove NSFW advanced settings option

This commit is contained in:
Stefan Ceriu
2024-06-10 13:35:11 +03:00
parent 9e879562f6
commit c1d10f720e
7 changed files with 4 additions and 61 deletions
+2 -26
View File
@@ -152,8 +152,7 @@ typedef NS_ENUM(NSUInteger, PRESENCE)
typedef NS_ENUM(NSUInteger, ADVANCED)
{
ADVANCED_SHOW_NSFW_ROOMS_INDEX = 0,
ADVANCED_CRASH_REPORT_INDEX,
ADVANCED_CRASH_REPORT_INDEX = 0,
ADVANCED_ENABLE_RAGESHAKE_INDEX,
ADVANCED_MARK_ALL_AS_READ_INDEX,
ADVANCED_CLEAR_CACHE_INDEX,
@@ -567,11 +566,6 @@ SSOAuthenticationPresenterDelegate>
Section *sectionAdvanced = [Section sectionWithTag:SECTION_TAG_ADVANCED];
sectionAdvanced.headerTitle = [VectorL10n settingsAdvanced];
if (RiotSettings.shared.settingsScreenShowNsfwRoomsOption)
{
[sectionAdvanced addRowWithTag:ADVANCED_SHOW_NSFW_ROOMS_INDEX];
}
if (BuildSettings.settingsScreenAllowChangingCrashUsageDataSettings)
{
[sectionAdvanced addRowWithTag:ADVANCED_CRASH_REPORT_INDEX];
@@ -2372,20 +2366,7 @@ SSOAuthenticationPresenterDelegate>
}
else if (section == SECTION_TAG_ADVANCED)
{
if (row == ADVANCED_SHOW_NSFW_ROOMS_INDEX)
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsShowNSFWPublicRooms];
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.showNSFWPublicRooms;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
labelAndSwitchCell.mxkSwitch.enabled = YES;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleNSFWPublicRoomsFiltering:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
else if (row == ADVANCED_CRASH_REPORT_INDEX)
if (row == ADVANCED_CRASH_REPORT_INDEX)
{
MXKTableViewCellWithLabelAndSwitch* sendCrashReportCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
@@ -4082,11 +4063,6 @@ SSOAuthenticationPresenterDelegate>
}
}
- (void)toggleNSFWPublicRoomsFiltering:(UISwitch *)sender
{
RiotSettings.shared.showNSFWPublicRooms = sender.isOn;
}
- (void)toggleEnableRoomMessageBubbles:(UISwitch *)sender
{
RiotSettings.shared.roomScreenEnableMessageBubbles = sender.isOn;