diff --git a/Header.h b/Header.h index b776d49..49a4131 100644 --- a/Header.h +++ b/Header.h @@ -30,6 +30,9 @@ @interface FRPSliderCell : UITableViewCell @end +@interface boolSettingsVC : UIViewController +@end + // iOS16 fix @interface OBPrivacyLinkButton : UIButton - (instancetype)initWithCaption:(NSString *)caption diff --git a/uYouPlus.xm b/uYouPlus.xm index fd7ca68..1fd6383 100644 --- a/uYouPlus.xm +++ b/uYouPlus.xm @@ -222,6 +222,16 @@ BOOL hidePaidPromotionCard() { } %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 %hook YTVideoQualitySwitchControllerFactory - (id)videoQualitySwitchControllerWithParentResponder:(id)responder {