Updated iPad version of ytns (experimental)

This commit is contained in:
arichornlover 2024-06-24 05:50:10 -05:00 committed by GitHub
parent 03591936d0
commit 7a4edbec64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -159,12 +159,14 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) {
- (BOOL)handleCommand:(id)command entry:(id)_entry fromView:(id)_fromView sender:(id)_sender completionBlock:(id)_completionBlock {
GPBExtensionDescriptor *shareEntityEndpointDescriptor = [%c(YTIShareEntityEndpoint) shareEntityEndpoint];
if (![command hasExtension:shareEntityEndpointDescriptor])
return %orig;
YTIShareEntityEndpoint *shareEntityEndpoint = [command getExtension:shareEntityEndpointDescriptor];
if(!shareEntityEndpoint || !shareEntityEndpoint.hasSerializedShareEntity || !shareEntityEndpoint.serializedShareEntity) {
return %orig;
YTIShareEntityEndpoint *shareEntityEndpoint = [command getExtension:shareEntityEndpointDescriptor];
if(!shareEntityEndpoint.hasSerializedShareEntity)
return %orig;
if (!showNativeShareSheet(shareEntityEndpoint.serializedShareEntity))
}
if (!showNativeShareSheet(shareEntityEndpoint.serializedShareEntity)) {
return %orig;
}
return TRUE;
}
%end