From 5b2436e39f5af005085bc483c9e19d9d9ea2371d Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichorn@users.noreply.github.com> Date: Thu, 11 Jan 2024 19:48:20 -0600 Subject: [PATCH] Update Themes.xm --- Source/Themes.xm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Themes.xm b/Source/Themes.xm index 333c900..f076337 100644 --- a/Source/Themes.xm +++ b/Source/Themes.xm @@ -688,8 +688,15 @@ UIColor *customHexColor; %ctor { if (IS_CUSTOM_DARK_THEME_SELECTED) { + NSData *colorData = [[NSUserDefaults standardUserDefaults] objectForKey:@"kCustomThemeColor"]; + NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingFromData:colorData error:nil]; + [unarchiver setRequiresSecureCoding:NO]; + NSString *hexString = [unarchiver decodeObjectForKey:NSKeyedArchiveRootObjectKey]; + if (hexString != nil) { + customHexColor = [unarchiver decodeObjectForKey:NSKeyedArchiveRootObjectKey]; %init(gCustomTheme); } +} if (IS_OLED_DARK_THEME_SELECTED) { %init(gOLED); }