mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 18:24:02 +00:00
Add option to show/hide history of videos in player queue view
This commit is contained in:
@@ -13,6 +13,7 @@ struct PlayerQueueView: View {
|
||||
@EnvironmentObject<PlayerModel> private var player
|
||||
|
||||
@Default(.saveHistory) private var saveHistory
|
||||
@Default(.showHistoryInPlayer) private var showHistoryInPlayer
|
||||
|
||||
var body: some View {
|
||||
List {
|
||||
@@ -21,7 +22,7 @@ struct PlayerQueueView: View {
|
||||
if sidebarQueue {
|
||||
related
|
||||
}
|
||||
if saveHistory {
|
||||
if saveHistory, showHistoryInPlayer {
|
||||
playedPreviously
|
||||
}
|
||||
}
|
||||
|
@@ -66,9 +66,15 @@ final class PlayerViewController: UIViewController {
|
||||
if CommentsModel.enabled {
|
||||
infoViewControllers.append(infoViewController([.comments], title: "Comments"))
|
||||
}
|
||||
|
||||
var queueSections = [NowPlayingView.ViewSection.playingNext]
|
||||
if Defaults[.showHistoryInPlayer] {
|
||||
queueSections.append(.playedPreviously)
|
||||
}
|
||||
|
||||
infoViewControllers.append(contentsOf: [
|
||||
infoViewController([.related], title: "Related"),
|
||||
infoViewController([.playingNext, .playedPreviously], title: "Playing Next")
|
||||
infoViewController(queueSections, title: "Queue")
|
||||
])
|
||||
|
||||
playerView.customInfoViewControllers = infoViewControllers
|
||||
|
Reference in New Issue
Block a user