Fix missing captionView when navigating via RailView

This commit is contained in:
Michael Kirk 2019-01-16 17:29:35 -07:00
parent c5d568de58
commit 3c0982e0f9

View file

@ -224,6 +224,9 @@ public class AttachmentApprovalViewController: UIPageViewController, UIPageViewC
self.setCurrentItem(firstItem, direction: .forward, animated: false)
// layout immediately to avoid animating the layout process during the transition
self.currentPageViewController.view.layoutIfNeeded()
// As a refresher, the _Information Architecture_ here is:
//
// You are approving an "Album", which has multiple "Attachments"
@ -533,6 +536,10 @@ public class AttachmentApprovalViewController: UIPageViewController, UIPageViewC
return
}
page.loadViewIfNeeded()
let keyboardScenario: KeyboardScenario = bottomToolView.isEditingMediaMessage ? .editingMessage : .hidden
page.updateCaptionViewBottomInset(keyboardScenario: keyboardScenario)
self.setViewControllers([page], direction: direction, animated: isAnimated, completion: nil)
updateMediaRail()
}