Merge pull request #900 from mpretty-cyro/fix/media-detail-to-all-media-transition
Fixed an issue where tapping All Media on the media detail screen wasn't working
This commit is contained in:
commit
ab610578e6
|
@ -469,8 +469,17 @@ class MediaPageViewController: UIPageViewController, UIPageViewControllerDataSou
|
|||
|
||||
// If the screen wasn't presented or it was presented from a location which isn't the
|
||||
// MediaTileViewController then just pop/dismiss the screen
|
||||
let parentNavController: UINavigationController? = {
|
||||
switch self.presentingViewController {
|
||||
case let topBannerController as TopBannerController:
|
||||
return topBannerController.children.first as? UINavigationController
|
||||
|
||||
default: return self.presentingViewController as? UINavigationController
|
||||
}
|
||||
}()
|
||||
|
||||
guard
|
||||
let presentingNavController: UINavigationController = (self.presentingViewController as? UINavigationController),
|
||||
let presentingNavController: UINavigationController = parentNavController,
|
||||
!(presentingNavController.viewControllers.last is AllMediaViewController)
|
||||
else {
|
||||
guard self.navigationController?.viewControllers.count == 1 else {
|
||||
|
|
Loading…
Reference in New Issue