mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Fix disabling comments on tvOS
This commit is contained in:
parent
eeb7b1f151
commit
8d9bbf647a
@ -45,11 +45,16 @@ final class PlayerViewController: UIViewController {
|
|||||||
|
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
playerModel.avPlayerViewController = playerViewController
|
playerModel.avPlayerViewController = playerViewController
|
||||||
playerViewController.customInfoViewControllers = [
|
var infoViewControllers = [UIHostingController<AnyView>]()
|
||||||
infoViewController([.comments], title: "Comments"),
|
if CommentsModel.enabled {
|
||||||
|
infoViewControllers.append(infoViewController([.comments], title: "Comments"))
|
||||||
|
}
|
||||||
|
infoViewControllers.append(contentsOf: [
|
||||||
infoViewController([.related], title: "Related"),
|
infoViewController([.related], title: "Related"),
|
||||||
infoViewController([.playingNext, .playedPreviously], title: "Playing Next")
|
infoViewController([.playingNext, .playedPreviously], title: "Playing Next")
|
||||||
]
|
])
|
||||||
|
|
||||||
|
playerViewController.customInfoViewControllers = infoViewControllers
|
||||||
#else
|
#else
|
||||||
embedViewController()
|
embedViewController()
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user