Simplified “Hide uYou Tab” Option
This commit is contained in:
parent
ece3636915
commit
2df6c20734
1 changed files with 1 additions and 14 deletions
15
uYouPlus.xm
15
uYouPlus.xm
|
|
@ -513,7 +513,7 @@ BOOL isAd(id node) {
|
|||
%end
|
||||
|
||||
%group gHideuYouTab
|
||||
%hook YTPivotBarView
|
||||
%hook YTPivotBarItemView
|
||||
- (void)setRenderer:(YTIPivotBarRenderer *)renderer {
|
||||
NSMutableArray<YTIPivotBarSupportedRenderers *> *items = [renderer itemsArray];
|
||||
|
||||
|
|
@ -526,19 +526,6 @@ BOOL isAd(id node) {
|
|||
|
||||
%orig;
|
||||
}
|
||||
- (void)layoutSubviews {
|
||||
%orig;
|
||||
|
||||
NSMutableArray<YTIPivotBarSupportedRenderers *> *items = [[self renderer] itemsArray];
|
||||
|
||||
NSUInteger index = [items indexOfObjectPassingTest:^BOOL(YTIPivotBarSupportedRenderers *renderers, NSUInteger idx, BOOL *stop) {
|
||||
return [[[renderers pivotBarItemRenderer] pivotIdentifier] isEqualToString:@"com.miro.uyou"];
|
||||
}];
|
||||
if (index != NSNotFound) {
|
||||
YTIPivotBarSupportedRenderers *renderers = [items objectAtIndex:index];
|
||||
[renderers setHidden:YES];
|
||||
}
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue