New code for red progress bar
This commit is contained in:
@@ -9,6 +9,8 @@
|
|||||||
#import "uYouPlusThemes.h" // Hide "Buy Super Thanks" banner (_ASDisplayView)
|
#import "uYouPlusThemes.h" // Hide "Buy Super Thanks" banner (_ASDisplayView)
|
||||||
#import <YouTubeHeader/YTAppDelegate.h> // Activate FLEX
|
#import <YouTubeHeader/YTAppDelegate.h> // Activate FLEX
|
||||||
#import <YouTubeHeader/YTIMenuConditionalServiceItemRenderer.h>
|
#import <YouTubeHeader/YTIMenuConditionalServiceItemRenderer.h>
|
||||||
|
#import <YouTubeHeader/YTIPlayerBarDecorationModel.h>
|
||||||
|
#import <YouTubeHeader/YTPlayerBarRectangleDecorationView.h>
|
||||||
|
|
||||||
// Hide buttons under the video player by @PoomSmart
|
// Hide buttons under the video player by @PoomSmart
|
||||||
#import <YouTubeHeader/ASCollectionElement.h>
|
#import <YouTubeHeader/ASCollectionElement.h>
|
||||||
|
|||||||
+15
-1
@@ -143,13 +143,27 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
|
|||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
// Bring back the red progress bar - Broken?!
|
// Bring back the red progress bar - old versions
|
||||||
%hook YTInlinePlayerBarContainerView
|
%hook YTInlinePlayerBarContainerView
|
||||||
- (id)quietProgressBarColor {
|
- (id)quietProgressBarColor {
|
||||||
return IS_ENABLED(@"redProgressBar_enabled") ? [UIColor redColor] : %orig;
|
return IS_ENABLED(@"redProgressBar_enabled") ? [UIColor redColor] : %orig;
|
||||||
}
|
}
|
||||||
%end
|
%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
|
// Hide videos' end screens
|
||||||
// See YTNoHoverCards.x
|
// See YTNoHoverCards.x
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user