mirror of
https://github.com/yattee/yattee.git
synced 2025-08-04 01:34:10 +00:00
Remove "Show history in player"
This commit is contained in:
@@ -115,7 +115,6 @@ extension Defaults.Keys {
|
||||
static let seekGestureSpeed = Key<Double>("seekGestureSpeed", default: 0.5)
|
||||
static let seekGestureSensitivity = Key<Double>("seekGestureSensitivity", default: 20.0)
|
||||
static let showKeywords = Key<Bool>("showKeywords", default: false)
|
||||
static let showHistoryInPlayer = Key<Bool>("showHistoryInPlayer", default: false)
|
||||
#if !os(tvOS)
|
||||
static let commentsPlacement = Key<CommentsPlacement>("commentsPlacement", default: .separate)
|
||||
#endif
|
||||
|
@@ -49,9 +49,6 @@ final class AppleAVPlayerViewController: UIViewController {
|
||||
infoViewControllers.append(infoViewController([.comments], title: "Comments"))
|
||||
|
||||
var queueSections = [NowPlayingView.ViewSection.playingNext]
|
||||
if Defaults[.showHistoryInPlayer] {
|
||||
queueSections.append(.playedPreviously)
|
||||
}
|
||||
|
||||
infoViewControllers.append(contentsOf: [
|
||||
infoViewController([.related], title: "Related"),
|
||||
|
@@ -15,7 +15,6 @@ struct PlayerQueueView: View {
|
||||
@EnvironmentObject<PlayerModel> private var player
|
||||
|
||||
@Default(.saveHistory) private var saveHistory
|
||||
@Default(.showHistoryInPlayer) private var showHistoryInPlayer
|
||||
|
||||
var body: some View {
|
||||
List {
|
||||
@@ -27,9 +26,6 @@ struct PlayerQueueView: View {
|
||||
if sidebarQueue {
|
||||
related
|
||||
}
|
||||
if saveHistory, showHistoryInPlayer {
|
||||
playedPreviously
|
||||
}
|
||||
}
|
||||
.listRowBackground(Color.clear)
|
||||
#if !os(iOS)
|
||||
@@ -108,28 +104,6 @@ struct PlayerQueueView: View {
|
||||
watches.filter { $0.videoID != player.currentVideo?.videoID }
|
||||
}
|
||||
|
||||
var playedPreviously: some View {
|
||||
Group {
|
||||
if !visibleWatches.isEmpty {
|
||||
Section(header: Text("History")) {
|
||||
ForEach(visibleWatches, id: \.videoID) { watch in
|
||||
PlayerQueueRow(
|
||||
item: PlayerQueueItem.from(watch, video: player.historyVideo(watch.videoID)),
|
||||
history: true,
|
||||
fullScreen: $fullScreen
|
||||
)
|
||||
.onAppear {
|
||||
player.loadHistoryVideoDetails(watch.videoID)
|
||||
}
|
||||
.contextMenu {
|
||||
VideoContextMenuView(video: watch.video)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder private var related: some View {
|
||||
if let related = player.currentVideo?.related, !related.isEmpty {
|
||||
Section(header: Text("Related")) {
|
||||
|
@@ -19,7 +19,7 @@ struct LocationsSettings: View {
|
||||
settings
|
||||
Spacer()
|
||||
#else
|
||||
List {
|
||||
Group {
|
||||
settings
|
||||
}
|
||||
#if os(iOS)
|
||||
|
@@ -6,7 +6,6 @@ struct PlayerSettings: View {
|
||||
@Default(.playerInstanceID) private var playerInstanceID
|
||||
|
||||
@Default(.playerSidebar) private var playerSidebar
|
||||
@Default(.showHistoryInPlayer) private var showHistory
|
||||
@Default(.playerControlsLayout) private var playerControlsLayout
|
||||
@Default(.fullScreenPlayerControlsLayout) private var fullScreenPlayerControlsLayout
|
||||
@Default(.horizontalPlayerGestureEnabled) private var horizontalPlayerGestureEnabled
|
||||
@@ -99,7 +98,6 @@ struct PlayerSettings: View {
|
||||
#endif
|
||||
|
||||
keywordsToggle
|
||||
showHistoryToggle
|
||||
|
||||
if !accounts.isDemo {
|
||||
returnYouTubeDislikeToggle
|
||||
@@ -225,10 +223,6 @@ struct PlayerSettings: View {
|
||||
Toggle("Show keywords", isOn: $showKeywords)
|
||||
}
|
||||
|
||||
private var showHistoryToggle: some View {
|
||||
Toggle("Show history", isOn: $showHistory)
|
||||
}
|
||||
|
||||
private var returnYouTubeDislikeToggle: some View {
|
||||
Toggle("Enable Return YouTube Dislike", isOn: $enableReturnYouTubeDislike)
|
||||
}
|
||||
|
Reference in New Issue
Block a user