mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-20 19:12:06 +00:00
New code for red progress bar
This commit is contained in:
parent
0ff17cad55
commit
c827624404
2 changed files with 17 additions and 1 deletions
|
|
@ -9,6 +9,8 @@
|
|||
#import "uYouPlusThemes.h" // Hide "Buy Super Thanks" banner (_ASDisplayView)
|
||||
#import <YouTubeHeader/YTAppDelegate.h> // Activate FLEX
|
||||
#import <YouTubeHeader/YTIMenuConditionalServiceItemRenderer.h>
|
||||
#import <YouTubeHeader/YTIPlayerBarDecorationModel.h>
|
||||
#import <YouTubeHeader/YTPlayerBarRectangleDecorationView.h>
|
||||
|
||||
// Hide buttons under the video player by @PoomSmart
|
||||
#import <YouTubeHeader/ASCollectionElement.h>
|
||||
|
|
|
|||
|
|
@ -143,13 +143,27 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
|
|||
}
|
||||
%end
|
||||
|
||||
// Bring back the red progress bar - Broken?!
|
||||
// Bring back the red progress bar - old versions
|
||||
%hook YTInlinePlayerBarContainerView
|
||||
- (id)quietProgressBarColor {
|
||||
return IS_ENABLED(@"redProgressBar_enabled") ? [UIColor redColor] : %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
// Bring back the red progress bar - new versions
|
||||
%hook YTPlayerBarRectangleDecorationView
|
||||
- (void)drawRectangleDecorationWithSideMasks:(CGRect)rect {
|
||||
if (IS_ENABLED(@"redProgressBar_enabled")) {
|
||||
YTIPlayerBarDecorationModel *model = [self valueForKey:@"_model"];
|
||||
int overlayMode = model.playingState.overlayMode;
|
||||
model.playingState.overlayMode = 1;
|
||||
%orig;
|
||||
model.playingState.overlayMode = overlayMode;
|
||||
} else
|
||||
%orig;
|
||||
}
|
||||
%end
|
||||
|
||||
// Hide videos' end screens
|
||||
// See YTNoHoverCards.x
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue