MESSENGER-4744 Removed black theme and map already set black theme to dark

This commit is contained in:
Arnfried Griesert
2023-06-14 06:28:28 +00:00
committed by Frank Rotermund
parent 7ed6d52ef7
commit b5f628c650
3 changed files with 18 additions and 6 deletions
+16 -4
View File
@@ -2482,9 +2482,15 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
theme = @"auto";
}
// bwi: 4744 (map previous set black theme to dark)
if([theme isEqualToString:@"black"]) {
theme = @"dark";
}
theme = [NSString stringWithFormat:@"settings_ui_theme_%@", theme];
NSString *i18nTheme = NSLocalizedStringFromTable(theme, @"Vector", nil);
cell.textLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
cell.textLabel.text = [VectorL10n settingsUiTheme];
@@ -4348,7 +4354,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
{
__weak typeof(self) weakSelf = self;
__block UIAlertAction *autoAction, *lightAction, *darkAction, *blackAction;
__block UIAlertAction *autoAction, *lightAction, *darkAction/* bwi: 4744 , *blackAction*/;
NSString *themePickerMessage;
void (^actionBlock)(UIAlertAction *action) = ^(UIAlertAction * action) {
@@ -4370,11 +4376,13 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
{
newTheme = @"dark";
}
/* bwi: 4744
else if (action == blackAction)
{
newTheme = @"black";
}
*/
NSString *theme = RiotSettings.shared.userInterfaceTheme;
if (newTheme && ![newTheme isEqualToString:theme])
{
@@ -4418,9 +4426,11 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
darkAction = [UIAlertAction actionWithTitle:[VectorL10n settingsUiThemeDark]
style:UIAlertActionStyleDefault
handler:actionBlock];
/* bwi: 4744
blackAction = [UIAlertAction actionWithTitle:[VectorL10n settingsUiThemeBlack]
style:UIAlertActionStyleDefault
handler:actionBlock];
*/
UIAlertController *themePicker = [UIAlertController alertControllerWithTitle:[VectorL10n settingsUiThemePickerTitle]
@@ -4433,8 +4443,10 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
}
[themePicker addAction:lightAction];
[themePicker addAction:darkAction];
/* bwi: 4744
[themePicker addAction:blackAction];
*/
// Cancel button
[themePicker addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel