From 1e2d6cf72fd1dfbad4e03ce51310167fe30b1ba7 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Tue, 23 May 2023 18:06:57 +0200 Subject: [PATCH] Move "Show toggle watch status button" to History settings --- Shared/Settings/BrowsingSettings.swift | 4 ---- Shared/Settings/HistorySettings.swift | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Shared/Settings/BrowsingSettings.swift b/Shared/Settings/BrowsingSettings.swift index e7783528..68bd4bb2 100644 --- a/Shared/Settings/BrowsingSettings.swift +++ b/Shared/Settings/BrowsingSettings.swift @@ -16,7 +16,6 @@ struct BrowsingSettings: View { @Default(.thumbnailsQuality) private var thumbnailsQuality @Default(.channelOnThumbnail) private var channelOnThumbnail @Default(.timeOnThumbnail) private var timeOnThumbnail - @Default(.showToggleWatchedStatusButton) private var showToggleWatchedStatusButton @Default(.showHome) private var showHome @Default(.showFavoritesInHome) private var showFavoritesInHome @Default(.showQueueInHome) private var showQueueInHome @@ -245,9 +244,6 @@ struct BrowsingSettings: View { #endif Toggle("Show channel name", isOn: $channelOnThumbnail) Toggle("Show video length", isOn: $timeOnThumbnail) - #if !os(tvOS) - Toggle("Show toggle watch status button", isOn: $showToggleWatchedStatusButton) - #endif } } diff --git a/Shared/Settings/HistorySettings.swift b/Shared/Settings/HistorySettings.swift index d017fc03..a999240d 100644 --- a/Shared/Settings/HistorySettings.swift +++ b/Shared/Settings/HistorySettings.swift @@ -16,6 +16,7 @@ struct HistorySettings: View { @Default(.watchedVideoBadgeColor) private var watchedVideoBadgeColor @Default(.watchedVideoPlayNowBehavior) private var watchedVideoPlayNowBehavior @Default(.resetWatchedStatusOnPlaying) private var resetWatchedStatusOnPlaying + @Default(.showToggleWatchedStatusButton) private var showToggleWatchedStatusButton var body: some View { Group { @@ -75,6 +76,8 @@ struct HistorySettings: View { .padding(.top, 1) #endif watchedVideoBadgeColorPicker + showToggleWatchedStatusButtonToggle + .disabled(watchedVideoStyle != .badge) } #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 { Section(header: SettingsHeader(text: "Badge color".localized(), secondary: true)) { Picker("Badge color", selection: $watchedVideoBadgeColor) {