Update uYouPlus.xm

This commit is contained in:
arichornlover 2024-06-25 19:32:43 -05:00 committed by GitHub
parent f535c919ca
commit 498f5bd3b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,7 +64,7 @@ NSBundle *tweakBundle = uYouPlusBundle();
%hook YTRightNavigationButtons
%property (retain, nonatomic) YTQTMButton *settingsButton;
- (NSMutableArray *)buttons {
NSString *tweakBundlePath = [[NSBundle mainBundle] pathForResource:@"uYouPlus" ofType:@"bundle"];
NSString *tweakBundlePath = [[NSBundle mainBundle] pathForResource:@"uYouPlus" ofType:@"bundle"];
NSString *buttonSettingsPath;
if (tweakBundlePath) {
NSBundle *tweakBundle = [NSBundle bundleWithPath:tweakBundlePath];
@ -92,11 +92,10 @@ NSBundle *tweakBundle = uYouPlusBundle();
}
- (NSMutableArray *)visibleButtons {
NSMutableArray *retVal = %orig.mutableCopy;
[self setLeadingPadding:+10];
[self.settingsButton removeFromSuperview];
[self addSubview:self.settingsButton];
[retVal insertObject:self.settingsButton atIndex:0];
}
[self setLeadingPadding:+10];
[self.settingsButton removeFromSuperview];
[self addSubview:self.settingsButton];
[retVal insertObject:self.settingsButton atIndex:0];
return retVal;
}
%new;