Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
levinli303 committed Feb 18, 2024
1 parent 6f927f7 commit 82bde29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MobileCelestia.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.15;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SHARED_BUILD_NUMBER = 453;
SHARED_BUILD_NUMBER = 454;
SHARED_BUILD_VERSION = 1.6.9;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand Down Expand Up @@ -1706,7 +1706,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 13.1;
MACOSX_DEPLOYMENT_TARGET = 10.15;
SDKROOT = iphoneos;
SHARED_BUILD_NUMBER = 453;
SHARED_BUILD_NUMBER = 454;
SHARED_BUILD_VERSION = 1.6.9;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
Expand Down
8 changes: 8 additions & 0 deletions MobileCelestia/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,14 @@ extension MainViewController: CelestiaControllerDelegate {
}

func celestiaControllerRequestShowActionMenu(_ celestiaController: CelestiaViewController) {
#if targetEnvironment(macCatalyst)
if #available(iOS 14, *) {
split?.preferredDisplayMode = .oneBesideSecondary
return
}
#endif
guard presentedViewController != actionViewController, !actionViewController.isBeingPresented else { return }

actionViewController.modalPresentationStyle = .custom
actionViewController.transitioningDelegate = toolbarSlideInManager
presentAfterDismissCurrent(actionViewController, animated: true)
Expand Down

0 comments on commit 82bde29

Please sign in to comment.