mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 10:32:46 +02:00
Add basic OLED black theme
This commit is contained in:
@@ -3542,7 +3542,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
|
||||
{
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
__block UIAlertAction *autoAction, *lightAction, *darkAction;
|
||||
__block UIAlertAction *autoAction, *lightAction, *darkAction, *blackAction;
|
||||
NSString *themePickerMessage;
|
||||
|
||||
void (^actionBlock)(UIAlertAction *action) = ^(UIAlertAction * action) {
|
||||
@@ -3564,6 +3564,10 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
|
||||
{
|
||||
newTheme = @"dark";
|
||||
}
|
||||
else if (action == blackAction)
|
||||
{
|
||||
newTheme = @"black";
|
||||
}
|
||||
|
||||
NSString *theme = [[NSUserDefaults standardUserDefaults] stringForKey:@"userInterfaceTheme"];
|
||||
if (newTheme && ![newTheme isEqualToString:theme])
|
||||
@@ -3598,6 +3602,10 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
|
||||
darkAction = [UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"settings_ui_theme_dark", @"Vector", nil)
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:actionBlock];
|
||||
blackAction = [UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"settings_ui_theme_black", @"Vector", nil)
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:actionBlock];
|
||||
|
||||
|
||||
UIAlertController *themePicker = [UIAlertController alertControllerWithTitle:NSLocalizedStringFromTable(@"settings_ui_theme_picker_title", @"Vector", nil)
|
||||
message:themePickerMessage
|
||||
@@ -3609,6 +3617,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
|
||||
}
|
||||
[themePicker addAction:lightAction];
|
||||
[themePicker addAction:darkAction];
|
||||
[themePicker addAction:blackAction];
|
||||
|
||||
// Cancel button
|
||||
[themePicker addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
|
||||
|
||||
Reference in New Issue
Block a user