@@ -3887,7 +3887,7 @@ - (void)showThemePicker
38873887{
38883888 __weak typeof (self) weakSelf = self;
38893889
3890- __block UIAlertAction *autoAction, *lightAction, *darkAction, *blackAction;
3890+ __block UIAlertAction *autoAction, *autoBlackAction, * lightAction, *darkAction, *blackAction;
38913891 NSString *themePickerMessage;
38923892
38933893 void (^actionBlock)(UIAlertAction *action) = ^(UIAlertAction * action) {
@@ -3913,6 +3913,10 @@ - (void)showThemePicker
39133913 {
39143914 newTheme = @" black" ;
39153915 }
3916+ else if (action == autoBlackAction)
3917+ {
3918+ newTheme = @" autoblack" ;
3919+ }
39163920
39173921 NSString *theme = RiotSettings.shared .userInterfaceTheme ;
39183922 if (newTheme && ![newTheme isEqualToString: theme])
@@ -3938,6 +3942,11 @@ - (void)showThemePicker
39383942 style: UIAlertActionStyleDefault
39393943 handler: actionBlock];
39403944
3945+ autoBlackAction = [UIAlertAction actionWithTitle: [VectorL10n settingsUiThemeAutoBlack ]
3946+ style: UIAlertActionStyleDefault
3947+ handler: actionBlock];
3948+
3949+
39413950 // Explain what is "auto"
39423951 if (@available (iOS 13 , *))
39433952 {
@@ -3970,6 +3979,10 @@ - (void)showThemePicker
39703979 {
39713980 [themePicker addAction: autoAction];
39723981 }
3982+ if (autoBlackAction)
3983+ {
3984+ [themePicker addAction: autoBlackAction];
3985+ }
39733986 [themePicker addAction: lightAction];
39743987 [themePicker addAction: darkAction];
39753988 [themePicker addAction: blackAction];
0 commit comments