Skip to content

Commit

Permalink
fix(iOS): GiphyDialog does not work with formSheet modal when using n…
Browse files Browse the repository at this point in the history
…ative-stack
  • Loading branch information
ALexanderLonsky committed Feb 21, 2024
1 parent 3648071 commit e4e7974
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ios/RTNGiphyDialogModuleImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ open class RTNGiphyDialogModuleImpl: NSObject {
}

let giphy = GiphyViewController()
let rootViewController = UIApplication.shared.windows.first?.rootViewController
var currentViewController = UIApplication.shared.windows.first?.rootViewController
while let presentedViewController = currentViewController?.presentedViewController {
currentViewController = presentedViewController
}
giphy.applyRNConfig(self.config)
giphy.delegate = self.giphyViewControllerDelegate
rootViewController?.present(giphy, animated: true, completion: { [weak self] in
currentViewController?.present(giphy, animated: true, completion: { [weak self] in
self?.giphyViewController = giphy
})
}
Expand Down

0 comments on commit e4e7974

Please sign in to comment.