Use new implementation. (YouTube Native Share 0.2.0-Preview)

This commit is contained in:
arichornlover 2024-07-08 19:49:59 -05:00 committed by GitHub
parent 9c5992b075
commit 83cc6b12d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -148,6 +148,18 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) {
/* -------------------- iPad Layout -------------------- */
%hook YTAccountScopedCommandResponderEvent
- (void)send {
GPBExtensionDescriptor *shareEntityEndpointDescriptor = [%c(YTIShareEntityEndpoint) shareEntityEndpoint];
if (![self.command hasExtension:shareEntityEndpointDescriptor])
return %orig;
YTIShareEntityEndpoint *shareEntityEndpoint = [self.command getExtension:shareEntityEndpointDescriptor];
if (!showNativeShareSheet(shareEntityEndpoint.serializedShareEntity))
return %orig;
}
%end
/* OLD
%hook YTShareRequestViewController
- (id)initWithService:(id)_service parentResponder:(id)_parentResponder {
id result = %orig;
@ -172,6 +184,7 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) {
return TRUE;
}
%end
*/
/* EXPERIMENTAL
%hook YTAccountScopedCommandRouter