mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-06 18:02:42 +00:00
Attempt to remove the gaps?!
I’m playing with fire, if this immediately crashes the app then I am sorry 😞
This commit is contained in:
parent
e084dca96b
commit
eef213242c
1 changed files with 12 additions and 1 deletions
|
|
@ -871,7 +871,7 @@ static NSString *accessGroupID() {
|
|||
}
|
||||
%end
|
||||
|
||||
// Hide the (Connect / Share / Remix / Thanks / Download / Clip / Save) Buttons under the Video Player - 17.x.x and up - @arichorn
|
||||
// Hide the (Connect / Share / Remix / Thanks / Download / Clip / Save) Buttons under the Video Player - 17.x.x and up - @arichornlover
|
||||
%hook _ASDisplayView
|
||||
- (void)layoutSubviews {
|
||||
%orig;
|
||||
|
|
@ -883,6 +883,9 @@ static NSString *accessGroupID() {
|
|||
BOOL hideClipButton = IS_ENABLED(@"hideClipButton_enabled");
|
||||
BOOL hideSaveToPlaylistButton = IS_ENABLED(@"hideSaveToPlaylistButton_enabled");
|
||||
|
||||
CGFloat buttonSeparation = 8;
|
||||
CGFloat currentX = 0;
|
||||
|
||||
for (UIView *subview in self.subviews) {
|
||||
if ([subview.accessibilityIdentifier isEqualToString:@"connect account"]) {
|
||||
subview.hidden = hideConnectButton;
|
||||
|
|
@ -899,6 +902,14 @@ static NSString *accessGroupID() {
|
|||
} else if ([subview.accessibilityLabel isEqualToString:@"Save to playlist"]) {
|
||||
subview.hidden = hideSaveToPlaylistButton;
|
||||
}
|
||||
|
||||
if (!subview.hidden) {
|
||||
CGRect frame = subview.frame;
|
||||
frame.origin.x = currentX;
|
||||
subview.frame = frame;
|
||||
|
||||
currentX += frame.size.width + buttonSeparation;
|
||||
}
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
|
|
|||
Loading…
Reference in a new issue