mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-19 04:06:27 +00:00
Prevent double dismiss
This commit is contained in:
parent
27213a78f4
commit
7ff10d999e
1 changed files with 9 additions and 6 deletions
|
@ -109,21 +109,24 @@ extension NewStatusViewController {
|
|||
|
||||
extension NewStatusViewController: PHPickerViewControllerDelegate {
|
||||
func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
|
||||
mediaSelections.send(results)
|
||||
dismiss(animated: true)
|
||||
dismiss(animated: true) {
|
||||
self.mediaSelections.send(results)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension NewStatusViewController: UIImagePickerControllerDelegate {
|
||||
func imagePickerController(_ picker: UIImagePickerController,
|
||||
didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) {
|
||||
imagePickerResults.send(info)
|
||||
dismiss(animated: true)
|
||||
dismiss(animated: true) {
|
||||
self.imagePickerResults.send(info)
|
||||
}
|
||||
}
|
||||
|
||||
func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
|
||||
imagePickerResults.send(nil)
|
||||
dismiss(animated: true)
|
||||
dismiss(animated: true) {
|
||||
self.imagePickerResults.send(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue