Add setting for saving videos history

This commit is contained in:
Arkadiusz Fal
2021-11-05 20:57:22 +01:00
parent 26f672ff4f
commit a7d9efdd9d
6 changed files with 23 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
import Defaults
import Foundation
import SwiftUI
@@ -7,6 +8,8 @@ struct PlayerQueueView: View {
@EnvironmentObject<PlayerModel> private var player
@Default(.saveHistory) private var saveHistory
var body: some View {
List {
Group {
@@ -14,7 +17,9 @@ struct PlayerQueueView: View {
if sidebarQueue {
related
}
playedPreviously
if saveHistory {
playedPreviously
}
}
#if !os(iOS)
.padding(.vertical, 5)

View File

@@ -105,7 +105,7 @@ struct VideoDetails: View {
}
.padding(.top, inNavigationView && fullScreen ? 10 : 0)
.onAppear {
if video.isNil {
if video.isNil && !sidebarQueue {
currentPage = .queue
}