Abort view transitions on failure.

This commit is contained in:
Matthew Chen 2019-09-20 11:59:41 -03:00
parent fff3a90041
commit a014aaafd3
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ extension MediaDismissAnimationController: UIViewControllerAnimatedTransitioning
guard let presentationImage = galleryItem.attachmentStream.originalImage else {
owsFailDebug("presentationImage was unexpectedly nil")
transitionContext.completeTransition(true)
transitionContext.completeTransition(false)
return
}

View File

@ -76,7 +76,7 @@ extension MediaZoomAnimationController: UIViewControllerAnimatedTransitioning {
guard let presentationImage = galleryItem.attachmentStream.originalImage else {
owsFailDebug("presentationImage was unexpectedly nil")
transitionContext.completeTransition(true)
transitionContext.completeTransition(false)
return
}