Skip to content

Commit

Permalink
fix: crash dismissPresentedViewController - WPB-15345 (#2442)
Browse files Browse the repository at this point in the history
  • Loading branch information
netbe authored and github-actions[bot] committed Jan 29, 2025
1 parent b4d966a commit aadbf7d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ public final class MainCoordinator<Dependencies>: NSObject, MainCoordinatorProto
conversation: ConversationModel,
message: ConversationMessageModel?
) {
Task {
Task { [weak self] in
guard let self else { return }
if mainSplitViewState == .expanded, splitViewController.splitBehavior == .overlay {
splitViewController.hideSidebar()
}
Expand Down Expand Up @@ -288,7 +289,9 @@ public final class MainCoordinator<Dependencies>: NSObject, MainCoordinatorProto

public func dismissPresentedViewController() async {
await withCheckedContinuation { continuation in
splitViewController.dismiss(animated: true, completion: continuation.resume)
if splitViewController != nil {
splitViewController.dismiss(animated: true, completion: continuation.resume)
}
}
}

Expand Down

0 comments on commit aadbf7d

Please sign in to comment.