Workaround for iOS 15 uYou settings bug (#10)

This commit is contained in:
level3tjg
2022-08-27 02:49:20 -04:00
parent 6418f3daeb
commit 11ddcd421d
2 changed files with 13 additions and 0 deletions
+3
View File
@@ -30,6 +30,9 @@
@interface FRPSliderCell : UITableViewCell @interface FRPSliderCell : UITableViewCell
@end @end
@interface boolSettingsVC : UIViewController
@end
// iOS16 fix // iOS16 fix
@interface OBPrivacyLinkButton : UIButton @interface OBPrivacyLinkButton : UIButton
- (instancetype)initWithCaption:(NSString *)caption - (instancetype)initWithCaption:(NSString *)caption
+10
View File
@@ -222,6 +222,16 @@ BOOL hidePaidPromotionCard() {
} }
%end %end
// Workaround for qnblackcat/uYouPlus#10
%hook boolSettingsVC
- (instancetype)initWithTitle:(NSString *)title sections:(NSArray *)sections footer:(NSString *)footer {
if (@available(iOS 15, *))
if (![self valueForKey:@"_lastNotifiedTraitCollection"])
[self setValue:[UITraitCollection currentTraitCollection] forKey:@"_lastNotifiedTraitCollection"];
return %orig;
}
%end
// YTClassicVideoQuality: https://github.com/PoomSmart/YTClassicVideoQuality // YTClassicVideoQuality: https://github.com/PoomSmart/YTClassicVideoQuality
%hook YTVideoQualitySwitchControllerFactory %hook YTVideoQualitySwitchControllerFactory
- (id)videoQualitySwitchControllerWithParentResponder:(id)responder { - (id)videoQualitySwitchControllerWithParentResponder:(id)responder {