mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 11:52:00 +00:00
Fix bugs
This commit is contained in:
parent
18d4465ebf
commit
2846d418ee
2 changed files with 10 additions and 3 deletions
|
|
@ -341,6 +341,13 @@ BOOL isAd(YTIElementRenderer *self) {
|
||||||
*/
|
*/
|
||||||
%new
|
%new
|
||||||
- (void)uYouEnhancedFakePremiumModel:(YTISectionListRenderer *)model {
|
- (void)uYouEnhancedFakePremiumModel:(YTISectionListRenderer *)model {
|
||||||
|
// Don't do anything if the version is too low
|
||||||
|
Class YTVersionUtilsClass = %c(YTVersionUtils);
|
||||||
|
NSString *appVersion = [YTVersionUtilsClass performSelector:@selector(appVersion)];
|
||||||
|
NSComparisonResult result = [appVersion compare:@"18.35.4" options:NSNumericSearch];
|
||||||
|
if (result == NSOrderedAscending) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
NSUInteger yourVideosCellIndex = -1;
|
NSUInteger yourVideosCellIndex = -1;
|
||||||
NSMutableArray <YTISectionListSupportedRenderers *> *overallContentsArray = model.contentsArray;
|
NSMutableArray <YTISectionListSupportedRenderers *> *overallContentsArray = model.contentsArray;
|
||||||
// Check each item in the overall array - this represents the whole You page
|
// Check each item in the overall array - this represents the whole You page
|
||||||
|
|
|
||||||
|
|
@ -398,7 +398,7 @@ extern NSBundle *uYouPlusBundle();
|
||||||
[settingsViewController reloadData];
|
[settingsViewController reloadData];
|
||||||
SHOW_RELAUNCH_YT_SNACKBAR;
|
SHOW_RELAUNCH_YT_SNACKBAR;
|
||||||
return YES;
|
return YES;
|
||||||
})
|
});
|
||||||
);
|
);
|
||||||
YTSettingsSectionItem *lowContrastModeButton = [%c(YTSettingsSectionItem)
|
YTSettingsSectionItem *lowContrastModeButton = [%c(YTSettingsSectionItem)
|
||||||
itemWithTitle:@"Low Contrast Mode Selector"
|
itemWithTitle:@"Low Contrast Mode Selector"
|
||||||
|
|
@ -1057,7 +1057,7 @@ extern NSBundle *uYouPlusBundle();
|
||||||
NSString *appVersion = [YTVersionUtilsClass performSelector:@selector(appVersion)];
|
NSString *appVersion = [YTVersionUtilsClass performSelector:@selector(appVersion)];
|
||||||
// Alert if the version is partially incompatible and the toggle is being turned on
|
// Alert if the version is partially incompatible and the toggle is being turned on
|
||||||
NSComparisonResult result = [appVersion compare:@"18.35.4" options:NSNumericSearch];
|
NSComparisonResult result = [appVersion compare:@"18.35.4" options:NSNumericSearch];
|
||||||
if (enabled && result == NSOrderedAscending) {
|
if (enable && result == NSOrderedAscending) {
|
||||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Incompatible" message:[NSString stringWithFormat:@"Warning: The \"You\" Tab doesn't exist in v%@.\nFake Logo will still work.", appVersion] preferredStyle:UIAlertControllerStyleAlert];
|
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Incompatible" message:[NSString stringWithFormat:@"Warning: The \"You\" Tab doesn't exist in v%@.\nFake Logo will still work.", appVersion] preferredStyle:UIAlertControllerStyleAlert];
|
||||||
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil];
|
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil];
|
||||||
[alert addAction:okAction];
|
[alert addAction:okAction];
|
||||||
|
|
@ -1068,7 +1068,7 @@ extern NSBundle *uYouPlusBundle();
|
||||||
[settingsViewController reloadData];
|
[settingsViewController reloadData];
|
||||||
SHOW_RELAUNCH_YT_SNACKBAR;
|
SHOW_RELAUNCH_YT_SNACKBAR;
|
||||||
return YES;
|
return YES;
|
||||||
})
|
});
|
||||||
);
|
);
|
||||||
// SWITCH_ITEM(LOC(@"Center YouTube Logo"), LOC(@"Toggle this to move the official YouTube Logo to the Center. App restart is required."), @"centerYouTubeLogo_enabled");
|
// SWITCH_ITEM(LOC(@"Center YouTube Logo"), LOC(@"Toggle this to move the official YouTube Logo to the Center. App restart is required."), @"centerYouTubeLogo_enabled");
|
||||||
SWITCH_ITEM(LOC(@"Hide YouTube Logo"), LOC(@"Toggle this to hide the YouTube Logo in the YouTube App."), @"hideYouTubeLogo_enabled");
|
SWITCH_ITEM(LOC(@"Hide YouTube Logo"), LOC(@"Toggle this to hide the YouTube Logo in the YouTube App."), @"hideYouTubeLogo_enabled");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue