Skip to content

Commit

Permalink
Updated iPad version of ytns (experimental)
Browse files Browse the repository at this point in the history
  • Loading branch information
arichornlover authored Jun 24, 2024
1 parent 0359193 commit 7a4edbe
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Sources/uYouPlusPatches.xm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit 7a4edbe

@arichornlover
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Experimenting with the share sheet functionality. Trying to stop the crashing.

Please sign in to comment.