Fix uYou theme bug (#617)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#import "Tweaks/YouTubeHeader/YTAppDelegate.h"
|
||||
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||
|
||||
#define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil]
|
||||
@@ -101,6 +102,12 @@ void center();
|
||||
- (id)activeVideo;
|
||||
@end
|
||||
|
||||
// uYou theme fix
|
||||
@interface YTAppDelegate ()
|
||||
@property(nonatomic, strong) id downloadsVC;
|
||||
@end
|
||||
|
||||
|
||||
// BigYTMiniPlayer
|
||||
@interface YTMainAppVideoPlayerOverlayView : UIView
|
||||
- (UIViewController *)_viewControllerForAncestor;
|
||||
|
||||
+18
@@ -1101,6 +1101,24 @@ void center() {
|
||||
}
|
||||
%end
|
||||
|
||||
// Workaround for qnblackcat/uYouPlus#617
|
||||
static BOOL didFinishLaunching;
|
||||
|
||||
%hook YTAppDelegate
|
||||
- (BOOL)application:(UIApplication *)application
|
||||
didFinishLaunchingWithOptions:(NSDictionary<UIApplicationLaunchOptionsKey, id> *)launchOptions {
|
||||
didFinishLaunching = %orig;
|
||||
self.downloadsVC = [self.downloadsVC init];
|
||||
return didFinishLaunching;
|
||||
}
|
||||
%end
|
||||
|
||||
%hook DownloadsPagerVC
|
||||
- (instancetype)init {
|
||||
return didFinishLaunching ? %orig : self;
|
||||
}
|
||||
%end
|
||||
|
||||
// iOS 16 uYou crash fix - @level3tjg: https://github.com/qnblackcat/uYouPlus/pull/224
|
||||
%group iOS16
|
||||
%hook OBPrivacyLinkButton
|
||||
|
||||
Reference in New Issue
Block a user