From 754e3e9c98083ec17861ff001bea7679f6f10aff Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:47:53 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=9CYTShareRequestViewController?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/uYouPlusPatches.xm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/uYouPlusPatches.xm b/Sources/uYouPlusPatches.xm index d68616a..2f078c5 100644 --- a/Sources/uYouPlusPatches.xm +++ b/Sources/uYouPlusPatches.xm @@ -151,8 +151,12 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) { /* %hook YTShareRequestViewController - (id)initWithService:(id)_service parentResponder:(id)_parentResponder { - // disable the default share sheet behavior and force the app to call [YTAccountScopedCommandRouter handleCommand] - return NULL; + id result = %orig; + // disable the default share sheet behavior and force the app to call [YTAccountScopedCommandRouter handleCommand] if available + if ([_parentResponder respondsToSelector:@selector(handleCommand:entry:fromView:sender:completionBlock:)]) { + [_parentResponder handleCommand:nil entry:nil fromView:nil sender:nil completionBlock:nil]; + } + return result; } %end */