Fix “YTShareRequestViewController”

This commit is contained in:
arichornlover 2024-07-03 15:49:35 -05:00 committed by GitHub
parent 5476d72761
commit b6897d50bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -148,14 +148,16 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) {
/* -------------------- iPad Layout -------------------- */ /* -------------------- iPad Layout -------------------- */
/*
%hook YTShareRequestViewController %hook YTShareRequestViewController
- (id)initWithService:(id)_service parentResponder:(id)_parentResponder { - (id)initWithService:(id)_service parentResponder:(id)_parentResponder {
// disable the default share sheet behavior and force the app to call [YTAccountScopedCommandRouter handleCommand] id result = %orig;
return NULL; // 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 %end
*/
%hook YTAccountScopedCommandRouter %hook YTAccountScopedCommandRouter
- (BOOL)handleCommand:(id)command entry:(id)_entry fromView:(id)_fromView sender:(id)_sender completionBlock:(id)_completionBlock { - (BOOL)handleCommand:(id)command entry:(id)_entry fromView:(id)_fromView sender:(id)_sender completionBlock:(id)_completionBlock {