mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 10:44:06 +00:00
Add setting for saving videos history
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user