Skip to content

Commit

Permalink
Merge pull request dayanch96#210 from PoomSmart/download-popover-sour…
Browse files Browse the repository at this point in the history
…ce-view

Make download action sheet pops from the source view
  • Loading branch information
dayanch96 authored Mar 10, 2024
2 parents 80767a3 + f6040b5 commit ca48693
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/Downloading.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
@end

@interface YTActionSheetController : NSObject
@property (nonatomic, strong, readwrite) UIView *sourceView;
- (void)addAction:(YTActionSheetAction *)action;
- (void)addHeaderWithTitle:(NSString *)title subtitle:(NSString *)subtitle;
- (void)presentFromViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void(^)(void))completion;
Expand Down
1 change: 1 addition & 0 deletions Source/Downloading.x
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ static UIImage *YTImageNamed(NSString *imageName) {

if (playerResponse) {
YTMActionSheetController *sheetController = [%c(YTMActionSheetController) musicActionSheetController];
sheetController.sourceView = sender;
[sheetController addHeaderWithTitle:LOC(@"SELECT_ACTION") subtitle:nil];

[sheetController addAction:[%c(YTActionSheetAction) actionWithTitle:LOC(@"DOWNLOAD_AUDIO") iconImage:YTImageNamed(@"yt_outline_audio_24pt") style:0 handler:^ {
Expand Down

0 comments on commit ca48693

Please sign in to comment.