mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-19 05:42:10 +00:00
Update uYouPlus.xm
This commit is contained in:
parent
c5a16d4328
commit
02ad8c7727
1 changed files with 0 additions and 56 deletions
|
|
@ -866,58 +866,6 @@ static NSMutableArray <YTIItemSectionRenderer *> *filteredArray(NSArray <YTIItem
|
|||
%end
|
||||
%end
|
||||
|
||||
// Fix LowContrastMode - @arichornlover
|
||||
static int contrastMode() {
|
||||
NSString *appVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
|
||||
NSComparisonResult result1 = [appVersion compare:@"17.33.2" options:NSNumericSearch];
|
||||
NSComparisonResult result2 = [appVersion compare:@"17.38.10" options:NSNumericSearch];
|
||||
|
||||
if (result1 != NSOrderedAscending && result2 != NSOrderedDescending) {
|
||||
return [[NSUserDefaults standardUserDefaults] integerForKey:@"lcm"];
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
%group gFixLowContrastMode
|
||||
%hook NSUserDefaults
|
||||
- (NSInteger)integerForKey:(NSString *)defaultName {
|
||||
if ([defaultName isEqualToString:@"lcm"]) {
|
||||
return contrastMode();
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
%hook NSBundle
|
||||
- (id)objectForInfoDictionaryKey:(NSString *)key {
|
||||
if ([key isEqualToString:@"CFBundleShortVersionString"]) {
|
||||
return @"17.38.10";
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YTVersionUtils
|
||||
+ (NSString *)appVersion {
|
||||
return @"17.38.10";
|
||||
}
|
||||
%end
|
||||
|
||||
/*
|
||||
%hook YTSettingsCell // Remove v17.38.10 Version Number - @Dayanch96
|
||||
- (void)setDetailText:(id)arg1 {
|
||||
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
|
||||
NSString *appVersion = infoDictionary[@"CFBundleShortVersionString"];
|
||||
|
||||
if ([arg1 isEqualToString:@"17.38.10"]) {
|
||||
arg1 = appVersion;
|
||||
} %orig(arg1);
|
||||
}
|
||||
%end
|
||||
*/
|
||||
%end
|
||||
|
||||
// Disable Modern/Rounded Buttons (_ASDisplayView Version's not supported) - @arichornlover
|
||||
%group gDisableModernButtons
|
||||
%hook YTQTMButton // Disable Modern/Rounded Buttons
|
||||
|
|
@ -1988,9 +1936,6 @@ static int contrastMode() {
|
|||
if (IS_ENABLED(kClassicVideoPlayer)) {
|
||||
%init(gClassicVideoPlayer);
|
||||
}
|
||||
if (IS_ENABLED(kFixLowContrastMode)) {
|
||||
%init(gFixLowContrastMode);
|
||||
}
|
||||
if (IS_ENABLED(kDisableModernButtons)) {
|
||||
%init(gDisableModernButtons);
|
||||
}
|
||||
|
|
@ -2076,7 +2021,6 @@ static int contrastMode() {
|
|||
[userDefaults setBool:enableVersionSpooferEnabled forKey:kEnableVersionSpoofer];
|
||||
}
|
||||
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
|
||||
[userDefaults setBool:ytNoModernUIEnabled ? ytNoModernUIEnabled : [userDefaults boolForKey:kFixLowContrastMode] forKey:kFixLowContrastMode];
|
||||
[userDefaults setBool:ytNoModernUIEnabled ? ytNoModernUIEnabled : [userDefaults boolForKey:kDisableModernButtons] forKey:kDisableModernButtons];
|
||||
[userDefaults setBool:ytNoModernUIEnabled ? ytNoModernUIEnabled : [userDefaults boolForKey:kDisableRoundedHints] forKey:kDisableRoundedHints];
|
||||
[userDefaults setBool:ytNoModernUIEnabled ? ytNoModernUIEnabled : [userDefaults boolForKey:kDisableModernFlags] forKey:kDisableModernFlags];
|
||||
|
|
|
|||
Loading…
Reference in a new issue