Move "Show toggle watch status button" to History settings

This commit is contained in:
Arkadiusz Fal 2023-05-23 18:06:57 +02:00
parent ac7dad2ab8
commit 1e2d6cf72f
2 changed files with 9 additions and 4 deletions

View File

@ -16,7 +16,6 @@ struct BrowsingSettings: View {
@Default(.thumbnailsQuality) private var thumbnailsQuality @Default(.thumbnailsQuality) private var thumbnailsQuality
@Default(.channelOnThumbnail) private var channelOnThumbnail @Default(.channelOnThumbnail) private var channelOnThumbnail
@Default(.timeOnThumbnail) private var timeOnThumbnail @Default(.timeOnThumbnail) private var timeOnThumbnail
@Default(.showToggleWatchedStatusButton) private var showToggleWatchedStatusButton
@Default(.showHome) private var showHome @Default(.showHome) private var showHome
@Default(.showFavoritesInHome) private var showFavoritesInHome @Default(.showFavoritesInHome) private var showFavoritesInHome
@Default(.showQueueInHome) private var showQueueInHome @Default(.showQueueInHome) private var showQueueInHome
@ -245,9 +244,6 @@ struct BrowsingSettings: View {
#endif #endif
Toggle("Show channel name", isOn: $channelOnThumbnail) Toggle("Show channel name", isOn: $channelOnThumbnail)
Toggle("Show video length", isOn: $timeOnThumbnail) Toggle("Show video length", isOn: $timeOnThumbnail)
#if !os(tvOS)
Toggle("Show toggle watch status button", isOn: $showToggleWatchedStatusButton)
#endif
} }
} }

View File

@ -16,6 +16,7 @@ struct HistorySettings: View {
@Default(.watchedVideoBadgeColor) private var watchedVideoBadgeColor @Default(.watchedVideoBadgeColor) private var watchedVideoBadgeColor
@Default(.watchedVideoPlayNowBehavior) private var watchedVideoPlayNowBehavior @Default(.watchedVideoPlayNowBehavior) private var watchedVideoPlayNowBehavior
@Default(.resetWatchedStatusOnPlaying) private var resetWatchedStatusOnPlaying @Default(.resetWatchedStatusOnPlaying) private var resetWatchedStatusOnPlaying
@Default(.showToggleWatchedStatusButton) private var showToggleWatchedStatusButton
var body: some View { var body: some View {
Group { Group {
@ -75,6 +76,8 @@ struct HistorySettings: View {
.padding(.top, 1) .padding(.top, 1)
#endif #endif
watchedVideoBadgeColorPicker watchedVideoBadgeColorPicker
showToggleWatchedStatusButtonToggle
.disabled(watchedVideoStyle != .badge)
} }
#if os(macOS) #if os(macOS)
@ -111,6 +114,12 @@ struct HistorySettings: View {
} }
} }
@ViewBuilder private var showToggleWatchedStatusButtonToggle: some View {
#if !os(tvOS)
Toggle("Show toggle watch status button", isOn: $showToggleWatchedStatusButton)
#endif
}
private var watchedVideoBadgeColorPicker: some View { private var watchedVideoBadgeColorPicker: some View {
Section(header: SettingsHeader(text: "Badge color".localized(), secondary: true)) { Section(header: SettingsHeader(text: "Badge color".localized(), secondary: true)) {
Picker("Badge color", selection: $watchedVideoBadgeColor) { Picker("Badge color", selection: $watchedVideoBadgeColor) {