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 SwiftUI
struct NowPlayingView: View {
@@ -10,6 +11,8 @@ struct NowPlayingView: View {
@EnvironmentObject<PlayerModel> private var player
@Default(.saveHistory) private var saveHistory
var body: some View {
if inInfoViewController {
content
@@ -80,7 +83,7 @@ struct NowPlayingView: View {
}
}
if sections.contains(.playedPreviously), !player.history.isEmpty {
if sections.contains(.playedPreviously), saveHistory, !player.history.isEmpty {
Section(header: Text("Played Previously")) {
ForEach(player.history) { item in
Button {