File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
WooCommerce/Classes/ViewRelated Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -190,14 +190,14 @@ final class MainTabBarController: UITabBarController {
190190
191191 delegate = self
192192
193- fixTabBarTraitCollectionOnIpadForiOS18 ( )
194-
195193 // POS tab is hidden by default.
196194 updateTabViewControllers ( isPOSTabVisible: false )
197195 observeSiteIDForViewControllers ( )
198196 observeProductImageUploadStatusUpdates ( )
199197
200198 startListeningToHubMenuTabBadgeUpdates ( )
199+
200+ fixTabBarTraitCollectionOnIpadForiOS18 ( )
201201 }
202202
203203 override func viewWillAppear( _ animated: Bool ) {
@@ -294,7 +294,7 @@ final class MainTabBarController: UITabBarController {
294294 private func fixTabBarTraitCollectionOnIpadForiOS18( ) {
295295 if #available( iOS 18 . 0 , * ) , UIDevice . current. userInterfaceIdiom == . pad {
296296 traitOverrides. horizontalSizeClass = . compact
297- if let rootHorizontalSizeClass = view . window? . traitCollection. horizontalSizeClass {
297+ if let rootHorizontalSizeClass = AppDelegate . shared . window? . traitCollection. horizontalSizeClass {
298298 tabBar. traitOverrides. horizontalSizeClass = rootHorizontalSizeClass
299299 if let viewControllers {
300300 for vc in viewControllers {
You can’t perform that action at this time.
0 commit comments