Prevent double dismiss
This commit is contained in:
parent
27213a78f4
commit
7ff10d999e
|
@ -109,21 +109,24 @@ extension NewStatusViewController {
|
||||||
|
|
||||||
extension NewStatusViewController: PHPickerViewControllerDelegate {
|
extension NewStatusViewController: PHPickerViewControllerDelegate {
|
||||||
func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
|
func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
|
||||||
mediaSelections.send(results)
|
dismiss(animated: true) {
|
||||||
dismiss(animated: true)
|
self.mediaSelections.send(results)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension NewStatusViewController: UIImagePickerControllerDelegate {
|
extension NewStatusViewController: UIImagePickerControllerDelegate {
|
||||||
func imagePickerController(_ picker: UIImagePickerController,
|
func imagePickerController(_ picker: UIImagePickerController,
|
||||||
didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) {
|
didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) {
|
||||||
imagePickerResults.send(info)
|
dismiss(animated: true) {
|
||||||
dismiss(animated: true)
|
self.imagePickerResults.send(info)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
|
func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
|
||||||
imagePickerResults.send(nil)
|
dismiss(animated: true) {
|
||||||
dismiss(animated: true)
|
self.imagePickerResults.send(nil)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue