From bc084c81126b7e52a7d65e05e6c667ea80bd0d45 Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Thu, 9 Feb 2023 20:05:45 +0700 Subject: [PATCH] Revert "Temporary fix for UI initialization bug" This reverts commit 256cd3846d4fc83b4a32746886cec5a3e6c63c8c. --- Natives/LauncherMenuViewController.m | 5 ++--- Natives/LauncherSplitViewController.m | 8 +++++--- Natives/ios_uikit_bridge.m | 8 ++++---- Natives/resources/Assets.car | Bin 2935824 -> 2935824 bytes 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Natives/LauncherMenuViewController.m b/Natives/LauncherMenuViewController.m index abab188d..3f7b406f 100644 --- a/Natives/LauncherMenuViewController.m +++ b/Natives/LauncherMenuViewController.m @@ -193,12 +193,11 @@ if ([selected isKindOfClass:UIViewController.class]) { [contentNavigationController setViewControllers:@[selected] animated:NO]; //YES? - /*if (@available(iOS 14.0, tvOS 14.0, *)) { + if (@available(iOS 14.0, tvOS 14.0, *)) { selected.navigationItem.leftBarButtonItem = self.accountBtnItem; // It is unnecessary to put the toggle button as it is automated on iOS 14+ return; - }*/ - + } selected.navigationItem.leftBarButtonItems = @[self.splitViewController.displayModeButtonItem, self.accountBtnItem]; selected.navigationItem.leftItemsSupplementBackButton = true; } else { diff --git a/Natives/LauncherSplitViewController.m b/Natives/LauncherSplitViewController.m index 0a0ef945..22e61a2e 100644 --- a/Natives/LauncherSplitViewController.m +++ b/Natives/LauncherSplitViewController.m @@ -53,9 +53,11 @@ extern NSMutableDictionary *prefDict; self.preferredDisplayMode = UISplitViewControllerDisplayModeSecondaryOnly; } } - /*if (@available(iOS 14.0, tvOS 14.0, *)) { - self.preferredSplitBehavior = UISplitViewControllerSplitBehaviorOverlay; - }*/ + if (@available(iOS 14.0, tvOS 14.0, *)) { + self.preferredSplitBehavior = isPortrait ? + UISplitViewControllerSplitBehaviorOverlay : + UISplitViewControllerSplitBehaviorTile; + } } - (void)dismissViewController { diff --git a/Natives/ios_uikit_bridge.m b/Natives/ios_uikit_bridge.m index 942371a0..e0e31b60 100644 --- a/Natives/ios_uikit_bridge.m +++ b/Natives/ios_uikit_bridge.m @@ -128,10 +128,10 @@ void launchInitialViewController(UIWindow *window) { if ([getPreference(@"internal_launch_on_boot") boolValue]) { window.rootViewController = [[SurfaceViewController alloc] init]; } else { - //if (@available(iOS 14.0, tvOS 14.0, *)) { - // window.rootViewController = [[LauncherSplitViewController alloc] initWithStyle:UISplitViewControllerStyleDoubleColumn]; - //} else { + if (@available(iOS 14.0, tvOS 14.0, *)) { + window.rootViewController = [[LauncherSplitViewController alloc] initWithStyle:UISplitViewControllerStyleDoubleColumn]; + } else { window.rootViewController = [[LauncherSplitViewController alloc] init]; - //} + } } } diff --git a/Natives/resources/Assets.car b/Natives/resources/Assets.car index 49a965eeef0d258f9e61be398f8b3f454d20c814..154ac9d6e505eecce6acfaf69d6a32c9afa6dcdc 100644 GIT binary patch delta 310 zcmaLSyAHu%0EXeeb!w|sa}#w5{@oq85wpQ6>EbdpBwY*!JG+5P@m_!!p1jGo zeTU;&IpFkIIyoVP2^|`;Fe3M@M8WfqwG!S|erQTB{H%JrK<)#nKt%#cq>x4i8gv-Q z!bA>v6kx$d5hax2pn@uDsH1@$;z&S;0TUK% zI7lLeG%|3JMGkosP(%r3R8U0?9_nbIi5A-Epo<>*7+{DI#+YDwmdbyw+_VtEhr1CW S6cO&(yZAHX$G*JzC;bcAM^Z!p