mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-20 02:32:10 +00:00
Use new implementation. (YouTube Native Share 0.2.0-Preview)
This commit is contained in:
parent
9c5992b075
commit
83cc6b12d2
1 changed files with 13 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue