mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 17:15:32 +00:00
Update YouTubeNativeShare from 0.2.4 to 0.2.6
This commit is contained in:
parent
c421c86843
commit
c397afd2f7
1 changed files with 8 additions and 3 deletions
|
|
@ -99,7 +99,8 @@ typedef NS_ENUM(NSInteger, ShareEntityType) {
|
|||
ShareEntityFieldPlaylist = 2,
|
||||
ShareEntityFieldChannel = 3,
|
||||
ShareEntityFieldPost = 6,
|
||||
ShareEntityFieldClip = 8
|
||||
ShareEntityFieldClip = 8,
|
||||
ShareEntityFieldShortFlag = 10
|
||||
};
|
||||
|
||||
static inline NSString* extractIdWithFormat(GPBUnknownFields *fields, NSInteger fieldNumber, NSString *format) {
|
||||
|
|
@ -137,8 +138,12 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity, UIView *source
|
|||
}
|
||||
}
|
||||
|
||||
if (!shareUrl)
|
||||
shareUrl = extractIdWithFormat(fields, ShareEntityFieldVideo, @"https://youtube.com/watch?v=%@");
|
||||
if (!shareUrl) {
|
||||
NSString *format = @"https://youtube.com/watch?v=%@";
|
||||
if ([fields fields:ShareEntityFieldShortFlag])
|
||||
format = @"https://youtube.com/shorts/%@";
|
||||
shareUrl = extractIdWithFormat(fields, ShareEntityFieldVideo, format);
|
||||
}
|
||||
|
||||
if (!shareUrl)
|
||||
shareUrl = extractIdWithFormat(fields, ShareEntityFieldPost, @"https://youtube.com/post/%@");
|
||||
|
|
|
|||
Loading…
Reference in a new issue