From 349a49eb93cbe4bb931d01418babcef43eda08d6 Mon Sep 17 00:00:00 2001 From: qnblackcat Date: Tue, 14 Jun 2022 11:06:17 +0700 Subject: [PATCH] fix hide next & previous button not working sometimes --- uYouPlus.xm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/uYouPlus.xm b/uYouPlus.xm index 569b88d..50d537b 100644 --- a/uYouPlus.xm +++ b/uYouPlus.xm @@ -86,11 +86,14 @@ BOOL ytMiniPlayer() { if (hideAutoplaySwitch()) {} else { return %orig; } } -- (void)layoutSubviews { +- (void)layoutSubviews { // hide Next & Previous button %orig; - if (hidePreviousAndNextButton()) { // hide Next & Previous button + if (hidePreviousAndNextButton()) { MSHookIvar(self, "_nextButton").hidden = YES; - MSHookIvar(self, "_previousButton").hidden = YES; + MSHookIvar(self, "_previousButton").hidden = YES; + // YouTube love beta testing :/ + MSHookIvar(self, "_nextButtonView").hidden = YES; + MSHookIvar(self, "_previousButtonView").hidden = YES; } } %end