From 6b78aba609f80692fcc0ebbe0f0c3a5d15a3cbb6 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sat, 13 Jul 2024 05:23:27 -0500 Subject: [PATCH] Remove Deprecated Code (Fullscreen to the Right) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UI_USER_INTERFACE_IDIOM() was the wrong Idiom and was deprecated, I am sorry for using the incorrect Device Type Checker 😅 --- YTLitePlus.xm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/YTLitePlus.xm b/YTLitePlus.xm index a0f0c24..821dd35 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -436,20 +436,20 @@ BOOL isTabSelected = NO; %group gFullscreenToTheRight %hook YTWatchViewController - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { - if ([self isFullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + if ([self isFullscreen] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { return UIInterfaceOrientationLandscapeRight; } return %orig; } - (UIInterfaceOrientationMask)supportedInterfaceOrientations { - if ([self isFullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + if ([self isFullscreen] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { return UIInterfaceOrientationMaskLandscape; } return %orig; } %new - (void)forceRightFullscreenOrientation { - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight]; [[UIDevice currentDevice] setValue:value forKey:@"orientation"]; }