Skip to content

Commit

Permalink
Merge pull request #17 from darvelo/darvelo/fix-dismiss-of-other-vcs
Browse files Browse the repository at this point in the history
Fix dismissal of non MCEmojiPicker viewcontrollers in SwiftUI
  • Loading branch information
izyumkin authored Jun 28, 2023
2 parents 220752c + 90e3311 commit 59381c8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ public struct MCEmojiPickerRepresentableController: UIViewControllerRepresentabl
context.coordinator.addPickerDismissingObserver()
representableController.present(emojiPicker, animated: true)
case false:
representableController.presentedViewController?.dismiss(animated: true)
if representableController.presentedViewController is MCEmojiPickerViewController {
representableController.presentedViewController?.dismiss(animated: true)
}
}
}
}
Expand Down

0 comments on commit 59381c8

Please sign in to comment.