Skip to content

Commit

Permalink
Hierarchy update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankmara authored Jul 31, 2024
1 parent 5413a0a commit ad7038d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ internal struct ContentBlockCarouselCallback: DefaultContentBlockCarouselCallbac
if action.type == .browser {
guard let stringUrl = action.url, let url = URL(safeString: stringUrl) else { return }
let safari = SFSafariViewController(url: url)
UIApplication.shared.windows.first?.rootViewController?.present(safari, animated: true)
if let presented = UIApplication.shared.windows.first?.rootViewController?.presentedViewController {
presented.present(safari, animated: true)
} else {
UIApplication.shared.windows.first?.rootViewController?.present(safari, animated: true)
}
} else {
invokeAction(action, contentBlock)
}
Expand Down

0 comments on commit ad7038d

Please # to comment.