Merge pull request #816 from therealFoxster/main

Actually remove uYou download button in playlists
This commit is contained in:
Nguyễn Đạt 2022-12-29 10:32:29 +07:00 committed by GitHub
commit 0b19ffb845
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -45,6 +45,10 @@
@property (nonatomic, assign, readwrite) BOOL enableSnapToChapter;
@end
@interface YTPlaylistHeaderViewController: UIViewController
@property UIButton *downloadsButton;
@end
// DontEatMyContent
BOOL DEMC_deviceIsSupported();
void DEMC_activate();

View file

@ -218,10 +218,9 @@ static BOOL didFinishLaunching;
// Remove uYou download button in playlists
// https://github.com/qnblackcat/uYouPlus/issues/798#issuecomment-1364853420
%hook YTPlaylistHeaderViewController
- (id)downloadsButton {
UIView *button = %orig;
button.hidden = true;
return button;
- (void)viewDidLoad {
%orig;
self.downloadsButton.hidden = YES;
}
%end
@ -1284,6 +1283,9 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
# pragma mark - ctor
%ctor {
// Load uYou first so its functions are available for hooks.
dlopen([[NSString stringWithFormat:@"%@/Frameworks/uYou.dylib", [[NSBundle mainBundle] bundlePath]] UTF8String], RTLD_LAZY);
%init;
if (@available(iOS 16, *)) {
%init(iOS16);