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); }