Add scrollbars in video details and button to scroll comments to top

Added player settings to disable scroll to top button

Fix #439
This commit is contained in:
Arkadiusz Fal
2023-05-07 21:45:07 +02:00
parent 55517fd44d
commit 3779b7ed1f
4 changed files with 57 additions and 16 deletions

View File

@@ -8,6 +8,9 @@ struct PlayerSettings: View {
@Default(.playerSidebar) private var playerSidebar
@Default(.showKeywords) private var showKeywords
#if !os(tvOS)
@Default(.showScrollToTopInComments) private var showScrollToTopInComments
#endif
@Default(.expandVideoDescription) private var expandVideoDescription
@Default(.pauseOnHidingPlayer) private var pauseOnHidingPlayer
#if os(iOS)
@@ -86,6 +89,11 @@ struct PlayerSettings: View {
if !accounts.isEmpty {
keywordsToggle
#if !os(tvOS)
showScrollToTopInCommentsToggle
#endif
#if !os(tvOS)
expandVideoDescriptionToggle
#endif
@@ -160,6 +168,12 @@ struct PlayerSettings: View {
.modifier(SettingsPickerModifier())
}
#if !os(tvOS)
private var showScrollToTopInCommentsToggle: some View {
Toggle("Show scroll to top button in comments", isOn: $showScrollToTopInComments)
}
#endif
private var keywordsToggle: some View {
Toggle("Show keywords", isOn: $showKeywords)
}