mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-01-11 22:40:19 +00:00
21 lines
No EOL
640 B
Text
21 lines
No EOL
640 B
Text
#import <YouTubeHeader/YTAlertView.h>
|
|
#import "uYouPlus.h"
|
|
|
|
extern NSBundle *uYouPlusBundle();
|
|
|
|
// YTCastConfirm: https://github.com/JamieBerghmans/YTCastConfirm
|
|
%hook MDXPlaybackRouteButtonController
|
|
- (void)didPressButton:(id)arg1 {
|
|
if (IS_ENABLED(@"castConfirm_enabled")) {
|
|
NSBundle *tweakBundle = uYouPlusBundle();
|
|
YTAlertView *alertView = [%c(YTAlertView) confirmationDialogWithAction:^{
|
|
%orig;
|
|
} actionTitle:LOC(@"MSG_YES")];
|
|
alertView.title = LOC(@"CASTING");
|
|
alertView.subtitle = LOC(@"MSG_ARE_YOU_SURE");
|
|
[alertView show];
|
|
} else {
|
|
return %orig;
|
|
}
|
|
}
|
|
%end |