forked from shadowfacts/Tusker
Fix loading indicator never disappearing when presenting gallery from status with >4 attachments
This commit is contained in:
parent
69ee3bb4f0
commit
490d48c635
|
@ -109,8 +109,6 @@ class GalleryPresentationAnimationController: NSObject, UIViewControllerAnimated
|
|||
itemViewController.addContent()
|
||||
|
||||
transitionContext.completeTransition(true)
|
||||
|
||||
to.presentationAnimationCompleted()
|
||||
}
|
||||
|
||||
animator.startAnimation()
|
||||
|
@ -132,8 +130,6 @@ class GalleryPresentationAnimationController: NSObject, UIViewControllerAnimated
|
|||
}
|
||||
animator.addCompletion { _ in
|
||||
transitionContext.completeTransition(!transitionContext.transitionWasCancelled)
|
||||
|
||||
to.presentationAnimationCompleted()
|
||||
}
|
||||
animator.startAnimation()
|
||||
}
|
||||
|
|
|
@ -68,6 +68,17 @@ public class GalleryViewController: UIPageViewController {
|
|||
setViewControllers([makeItemVC(index: initialItemIndex)], direction: .forward, animated: false)
|
||||
}
|
||||
|
||||
public override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
if animated {
|
||||
// Wait until the transition is no longer in-progress, otherwise things will just get deferred again.
|
||||
DispatchQueue.main.async {
|
||||
self.presentationAnimationCompleted()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
|
||||
|
|
Loading…
Reference in New Issue