mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-01-11 22:40:19 +00:00
Cleanup and minor changes
This commit is contained in:
parent
0916c7d5d7
commit
25ec06b2ce
3 changed files with 39 additions and 41 deletions
2
.github/workflows/buildapp.yml
vendored
2
.github/workflows/buildapp.yml
vendored
|
|
@ -38,7 +38,7 @@ on:
|
|||
type: string
|
||||
create_release:
|
||||
description: "Create a draft release"
|
||||
default: true
|
||||
default: false
|
||||
required: false
|
||||
type: boolean
|
||||
upload_artifact:
|
||||
|
|
|
|||
|
|
@ -84,40 +84,40 @@
|
|||
|
||||
// Hide Premium Promo in You tab - @bhackel
|
||||
@interface YTIIconThumbnailRenderer : GPBMessage
|
||||
@property (nonatomic, strong) YTIIcon *icon;
|
||||
- (bool)hasIcon;
|
||||
@property (nonatomic, strong) YTIIcon *icon;
|
||||
- (BOOL)hasIcon;
|
||||
@end
|
||||
@interface YTICompactListItemThumbnailSupportedRenderers : GPBMessage
|
||||
@property (nonatomic, strong) YTIIconThumbnailRenderer *iconThumbnailRenderer;
|
||||
- (bool)hasIconThumbnailRenderer;
|
||||
@property (nonatomic, strong) YTIIconThumbnailRenderer *iconThumbnailRenderer;
|
||||
- (BOOL)hasIconThumbnailRenderer;
|
||||
@end
|
||||
@interface YTICompactListItemRenderer : GPBMessage
|
||||
@property (nonatomic, strong) YTICompactListItemThumbnailSupportedRenderers *thumbnail;
|
||||
@property (nonatomic, strong) YTIFormattedString *title;
|
||||
- (bool)hasThumbnail;
|
||||
- (bool)hasTitle;
|
||||
@property (nonatomic, strong) YTICompactListItemThumbnailSupportedRenderers *thumbnail;
|
||||
@property (nonatomic, strong) YTIFormattedString *title;
|
||||
- (BOOL)hasThumbnail;
|
||||
- (BOOL)hasTitle;
|
||||
@end
|
||||
@interface YTIIcon (uYouEnhanced)
|
||||
- (bool)hasIconType;
|
||||
- (BOOL)hasIconType;
|
||||
@end
|
||||
@interface YTICompactLinkRenderer : GPBMessage
|
||||
@property (nonatomic, strong) YTIIcon *icon;
|
||||
@property (nonatomic, strong) YTIFormattedString *title;
|
||||
@property (nonatomic, strong) YTICompactListItemThumbnailSupportedRenderers *thumbnail;
|
||||
- (bool)hasIcon;
|
||||
- (bool)hasThumbnail;
|
||||
@property (nonatomic, strong) YTIIcon *icon;
|
||||
@property (nonatomic, strong) YTIFormattedString *title;
|
||||
@property (nonatomic, strong) YTICompactListItemThumbnailSupportedRenderers *thumbnail;
|
||||
- (BOOL)hasIcon;
|
||||
- (BOOL)hasThumbnail;
|
||||
@end
|
||||
@interface YTIItemSectionSupportedRenderers (uYouEnhanced)
|
||||
@property(readonly, nonatomic) YTICompactLinkRenderer *compactLinkRenderer;
|
||||
@property(readonly, nonatomic) YTICompactListItemRenderer *compactListItemRenderer;
|
||||
- (bool)hasCompactLinkRenderer;
|
||||
- (bool)hasCompactListItemRenderer;
|
||||
@property(readonly, nonatomic) YTICompactLinkRenderer *compactLinkRenderer;
|
||||
@property(readonly, nonatomic) YTICompactListItemRenderer *compactListItemRenderer;
|
||||
- (BOOL)hasCompactLinkRenderer;
|
||||
- (BOOL)hasCompactListItemRenderer;
|
||||
@end
|
||||
@interface YTAppCollectionViewController : YTInnerTubeCollectionViewController
|
||||
- (void)uYouEnhancedFakePremiumModel:(YTISectionListRenderer *)model;
|
||||
@end
|
||||
@interface YTInnerTubeCollectionViewController (uYouEnhanced)
|
||||
@property(readonly, nonatomic) YTISectionListRenderer *model;
|
||||
@property(readonly, nonatomic) YTISectionListRenderer *model;
|
||||
@end
|
||||
|
||||
// Disable Pull to Full for landscape videos - @bhackel
|
||||
|
|
|
|||
|
|
@ -767,6 +767,9 @@ BOOL isAd(YTIElementRenderer *self) {
|
|||
%hook YTInlinePlayerDoubleTapIndicatorView
|
||||
%property(nonatomic, strong) CABasicAnimation *uYouEnhancedBlankAlphaAnimation;
|
||||
%property(nonatomic, strong) CABasicAnimation *uYouEnhancedBlankColorAnimation;
|
||||
/**
|
||||
* @return A clear color animation
|
||||
*/
|
||||
%new
|
||||
- (CABasicAnimation *)uYouEnhancedGetBlankColorAnimation {
|
||||
if (!self.uYouEnhancedBlankColorAnimation) {
|
||||
|
|
@ -781,26 +784,7 @@ BOOL isAd(YTIElementRenderer *self) {
|
|||
}
|
||||
return self.uYouEnhancedBlankColorAnimation;
|
||||
}
|
||||
- (CABasicAnimation *)alphaAnimation {
|
||||
if (!self.uYouEnhancedBlankAlphaAnimation) {
|
||||
NSLog(@"bhackel: Creating new alpha animation");
|
||||
// Create a new basic animation for the opacity property
|
||||
self.uYouEnhancedBlankAlphaAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"];
|
||||
// Set values to 0 to prevent visibility
|
||||
NSLog(@"bhackel: Creating new alpha animation 2");
|
||||
self.uYouEnhancedBlankAlphaAnimation.fromValue = @0.0;
|
||||
NSLog(@"bhackel: Creating new alpha animation 3");
|
||||
self.uYouEnhancedBlankAlphaAnimation.toValue = @0.0;
|
||||
NSLog(@"bhackel: Creating new alpha animation 4");
|
||||
self.uYouEnhancedBlankAlphaAnimation.duration = 0.0;
|
||||
NSLog(@"bhackel: Creating new alpha animation 5");
|
||||
self.uYouEnhancedBlankAlphaAnimation.fillMode = kCAFillModeForwards;
|
||||
NSLog(@"bhackel: Creating new alpha animation 6");
|
||||
self.uYouEnhancedBlankAlphaAnimation.removedOnCompletion = NO;
|
||||
NSLog(@"bhackel: Creating new alpha animation 7");
|
||||
}
|
||||
return self.uYouEnhancedBlankAlphaAnimation;
|
||||
}
|
||||
// Replace all color animations with a clear one
|
||||
- (CABasicAnimation *)fillColorAnimation {
|
||||
return [self uYouEnhancedGetBlankColorAnimation];
|
||||
}
|
||||
|
|
@ -810,7 +794,21 @@ BOOL isAd(YTIElementRenderer *self) {
|
|||
- (CABasicAnimation *)laterBackgroundcolorAnimation {
|
||||
return [self uYouEnhancedGetBlankColorAnimation];
|
||||
}
|
||||
|
||||
// Replace the opacity animation with a clear one
|
||||
- (CABasicAnimation *)alphaAnimation {
|
||||
if (!self.uYouEnhancedBlankAlphaAnimation) {
|
||||
// Create a new basic animation for the opacity property
|
||||
self.uYouEnhancedBlankAlphaAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"];
|
||||
// Set values to 0 to prevent visibility
|
||||
self.uYouEnhancedBlankAlphaAnimation.fromValue = @0.0;
|
||||
self.uYouEnhancedBlankAlphaAnimation.toValue = @0.0;
|
||||
self.uYouEnhancedBlankAlphaAnimation.duration = 0.0;
|
||||
self.uYouEnhancedBlankAlphaAnimation.fillMode = kCAFillModeForwards;
|
||||
self.uYouEnhancedBlankAlphaAnimation.removedOnCompletion = NO;
|
||||
}
|
||||
return self.uYouEnhancedBlankAlphaAnimation;
|
||||
}
|
||||
// Remove the screen darkening effect
|
||||
- (void)layoutSubviews {
|
||||
%orig;
|
||||
// Set the 0th subview (which darkens the screen) to hidden
|
||||
|
|
|
|||
Loading…
Reference in a new issue