mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 03:32:08 +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
|
type: string
|
||||||
create_release:
|
create_release:
|
||||||
description: "Create a draft release"
|
description: "Create a draft release"
|
||||||
default: true
|
default: false
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
upload_artifact:
|
upload_artifact:
|
||||||
|
|
|
||||||
|
|
@ -84,40 +84,40 @@
|
||||||
|
|
||||||
// Hide Premium Promo in You tab - @bhackel
|
// Hide Premium Promo in You tab - @bhackel
|
||||||
@interface YTIIconThumbnailRenderer : GPBMessage
|
@interface YTIIconThumbnailRenderer : GPBMessage
|
||||||
@property (nonatomic, strong) YTIIcon *icon;
|
@property (nonatomic, strong) YTIIcon *icon;
|
||||||
- (bool)hasIcon;
|
- (BOOL)hasIcon;
|
||||||
@end
|
@end
|
||||||
@interface YTICompactListItemThumbnailSupportedRenderers : GPBMessage
|
@interface YTICompactListItemThumbnailSupportedRenderers : GPBMessage
|
||||||
@property (nonatomic, strong) YTIIconThumbnailRenderer *iconThumbnailRenderer;
|
@property (nonatomic, strong) YTIIconThumbnailRenderer *iconThumbnailRenderer;
|
||||||
- (bool)hasIconThumbnailRenderer;
|
- (BOOL)hasIconThumbnailRenderer;
|
||||||
@end
|
@end
|
||||||
@interface YTICompactListItemRenderer : GPBMessage
|
@interface YTICompactListItemRenderer : GPBMessage
|
||||||
@property (nonatomic, strong) YTICompactListItemThumbnailSupportedRenderers *thumbnail;
|
@property (nonatomic, strong) YTICompactListItemThumbnailSupportedRenderers *thumbnail;
|
||||||
@property (nonatomic, strong) YTIFormattedString *title;
|
@property (nonatomic, strong) YTIFormattedString *title;
|
||||||
- (bool)hasThumbnail;
|
- (BOOL)hasThumbnail;
|
||||||
- (bool)hasTitle;
|
- (BOOL)hasTitle;
|
||||||
@end
|
@end
|
||||||
@interface YTIIcon (uYouEnhanced)
|
@interface YTIIcon (uYouEnhanced)
|
||||||
- (bool)hasIconType;
|
- (BOOL)hasIconType;
|
||||||
@end
|
@end
|
||||||
@interface YTICompactLinkRenderer : GPBMessage
|
@interface YTICompactLinkRenderer : GPBMessage
|
||||||
@property (nonatomic, strong) YTIIcon *icon;
|
@property (nonatomic, strong) YTIIcon *icon;
|
||||||
@property (nonatomic, strong) YTIFormattedString *title;
|
@property (nonatomic, strong) YTIFormattedString *title;
|
||||||
@property (nonatomic, strong) YTICompactListItemThumbnailSupportedRenderers *thumbnail;
|
@property (nonatomic, strong) YTICompactListItemThumbnailSupportedRenderers *thumbnail;
|
||||||
- (bool)hasIcon;
|
- (BOOL)hasIcon;
|
||||||
- (bool)hasThumbnail;
|
- (BOOL)hasThumbnail;
|
||||||
@end
|
@end
|
||||||
@interface YTIItemSectionSupportedRenderers (uYouEnhanced)
|
@interface YTIItemSectionSupportedRenderers (uYouEnhanced)
|
||||||
@property(readonly, nonatomic) YTICompactLinkRenderer *compactLinkRenderer;
|
@property(readonly, nonatomic) YTICompactLinkRenderer *compactLinkRenderer;
|
||||||
@property(readonly, nonatomic) YTICompactListItemRenderer *compactListItemRenderer;
|
@property(readonly, nonatomic) YTICompactListItemRenderer *compactListItemRenderer;
|
||||||
- (bool)hasCompactLinkRenderer;
|
- (BOOL)hasCompactLinkRenderer;
|
||||||
- (bool)hasCompactListItemRenderer;
|
- (BOOL)hasCompactListItemRenderer;
|
||||||
@end
|
@end
|
||||||
@interface YTAppCollectionViewController : YTInnerTubeCollectionViewController
|
@interface YTAppCollectionViewController : YTInnerTubeCollectionViewController
|
||||||
- (void)uYouEnhancedFakePremiumModel:(YTISectionListRenderer *)model;
|
- (void)uYouEnhancedFakePremiumModel:(YTISectionListRenderer *)model;
|
||||||
@end
|
@end
|
||||||
@interface YTInnerTubeCollectionViewController (uYouEnhanced)
|
@interface YTInnerTubeCollectionViewController (uYouEnhanced)
|
||||||
@property(readonly, nonatomic) YTISectionListRenderer *model;
|
@property(readonly, nonatomic) YTISectionListRenderer *model;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// Disable Pull to Full for landscape videos - @bhackel
|
// Disable Pull to Full for landscape videos - @bhackel
|
||||||
|
|
|
||||||
|
|
@ -767,6 +767,9 @@ BOOL isAd(YTIElementRenderer *self) {
|
||||||
%hook YTInlinePlayerDoubleTapIndicatorView
|
%hook YTInlinePlayerDoubleTapIndicatorView
|
||||||
%property(nonatomic, strong) CABasicAnimation *uYouEnhancedBlankAlphaAnimation;
|
%property(nonatomic, strong) CABasicAnimation *uYouEnhancedBlankAlphaAnimation;
|
||||||
%property(nonatomic, strong) CABasicAnimation *uYouEnhancedBlankColorAnimation;
|
%property(nonatomic, strong) CABasicAnimation *uYouEnhancedBlankColorAnimation;
|
||||||
|
/**
|
||||||
|
* @return A clear color animation
|
||||||
|
*/
|
||||||
%new
|
%new
|
||||||
- (CABasicAnimation *)uYouEnhancedGetBlankColorAnimation {
|
- (CABasicAnimation *)uYouEnhancedGetBlankColorAnimation {
|
||||||
if (!self.uYouEnhancedBlankColorAnimation) {
|
if (!self.uYouEnhancedBlankColorAnimation) {
|
||||||
|
|
@ -781,26 +784,7 @@ BOOL isAd(YTIElementRenderer *self) {
|
||||||
}
|
}
|
||||||
return self.uYouEnhancedBlankColorAnimation;
|
return self.uYouEnhancedBlankColorAnimation;
|
||||||
}
|
}
|
||||||
- (CABasicAnimation *)alphaAnimation {
|
// Replace all color animations with a clear one
|
||||||
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;
|
|
||||||
}
|
|
||||||
- (CABasicAnimation *)fillColorAnimation {
|
- (CABasicAnimation *)fillColorAnimation {
|
||||||
return [self uYouEnhancedGetBlankColorAnimation];
|
return [self uYouEnhancedGetBlankColorAnimation];
|
||||||
}
|
}
|
||||||
|
|
@ -810,7 +794,21 @@ BOOL isAd(YTIElementRenderer *self) {
|
||||||
- (CABasicAnimation *)laterBackgroundcolorAnimation {
|
- (CABasicAnimation *)laterBackgroundcolorAnimation {
|
||||||
return [self uYouEnhancedGetBlankColorAnimation];
|
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 {
|
- (void)layoutSubviews {
|
||||||
%orig;
|
%orig;
|
||||||
// Set the 0th subview (which darkens the screen) to hidden
|
// Set the 0th subview (which darkens the screen) to hidden
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue