Update LowContrastMode.xm

This commit is contained in:
arichornlover 2024-01-11 20:11:28 -06:00 committed by GitHub
parent dc2ccb6528
commit d6380ee379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -577,6 +577,13 @@ UIColor *lcmHexColor;
%init(gLowContrastMode);
}
if (customContrastMode()) {
NSData *lcmColorData = [[NSUserDefaults standardUserDefaults] objectForKey:@"kYTLcmColourOptionVFive"];
NSKeyedUnarchiver *lcmUnarchiver = [[NSKeyedUnarchiver alloc] initForReadingFromData:lcmColorData error:nil];
[lcmUnarchiver setRequiresSecureCoding:NO];
NSString *lcmHexString = [lcmUnarchiver decodeObjectForKey:NSKeyedArchiveRootObjectKey];
if (lcmHexString != nil) {
lcmHexColor = [lcmUnarchiver decodeObjectForKey:NSKeyedArchiveRootObjectKey];
%init(gCustomContrastMode);
}
}
}