show real version, bug fixes

This commit is contained in:
dayanch96
2023-07-29 18:50:16 +03:00
parent e8c23c0e8f
commit d0f7d9521c
13 changed files with 201 additions and 11 deletions
+13 -1
View File
@@ -216,7 +216,7 @@
// Remove Dark Background in Overlay
%hook YTMainAppVideoPlayerOverlayView
- (void)setBackgroundVisible:(BOOL)arg1 { kNoDarkBg ? %orig(NO) : %orig; }
- (void)setBackgroundVisible:(BOOL)arg1 isGradientBackground:(BOOL)arg2 { kNoDarkBg ? %orig(NO, arg2) : %orig; }
%end
// No Endscreen Cards
@@ -333,6 +333,18 @@
}
%end
// Show real version in YT Settings
%hook YTSettingsCell
- (void)setDetailText:(id)arg1 {
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *appVersion = infoDictionary[@"CFBundleShortVersionString"];
if ([arg1 isEqualToString:@"18.18.2"]) {
arg1 = appVersion;
} %orig(arg1);
}
%end
// Disable Snap To Chapter (https://github.com/qnblackcat/uYouPlus/blob/main/uYouPlus.xm#L457-464)
%hook YTSegmentableInlinePlayerBarView
- (void)didMoveToWindow { %orig; if (kDontSnapToChapter) self.enableSnapToChapter = NO; }