Fixed an issue where tapping All Media on the media detail screen wasn't working
This commit is contained in:
parent
45bee6fdf9
commit
cbc1ab437b
|
@ -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
|
// If the screen wasn't presented or it was presented from a location which isn't the
|
||||||
// MediaTileViewController then just pop/dismiss the screen
|
// 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
|
guard
|
||||||
let presentingNavController: UINavigationController = (self.presentingViewController as? UINavigationController),
|
let presentingNavController: UINavigationController = parentNavController,
|
||||||
!(presentingNavController.viewControllers.last is AllMediaViewController)
|
!(presentingNavController.viewControllers.last is AllMediaViewController)
|
||||||
else {
|
else {
|
||||||
guard self.navigationController?.viewControllers.count == 1 else {
|
guard self.navigationController?.viewControllers.count == 1 else {
|
||||||
|
|
Loading…
Reference in New Issue