Update uYouPlusPatches.xm

This commit is contained in:
arichornlover 2024-07-12 15:02:22 -05:00 committed by GitHub
parent 6433ce1826
commit 829b0c7d6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -146,12 +146,16 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) {
UIViewController *topViewController = [%c(YTUIUtils) topViewControllerForPresenting];
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
if (activityViewController.popoverPresentationController) {
activityViewController.popoverPresentationController.sourceView = topViewController.view;
CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
activityViewController.popoverPresentationController.sourceRect = CGRectMake(screenWidth / 2.0, screenHeight, 0, 0);
activityViewController.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirectionAny;
}
[topViewController presentViewController:activityViewController animated:YES completion:nil];
return YES;
}
@ -347,7 +351,6 @@ static void refreshUYouAppearance() {
// Disable uYou's playback speed controls (prevent crash on video playback https://github.com/therealFoxster/uYouPlus/issues/2#issuecomment-1894912963)
// [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"showPlaybackRate"];
// Disable uYou's adblock
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"removeYouTubeAds"];
}