mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 10:44:06 +00:00
Merge pull request #744 from stonerl/hide-comments
Allow hiding comments
This commit is contained in:
@@ -203,6 +203,7 @@ struct VideoDetails: View {
|
||||
@Default(.showChapterThumbnails) private var showChapterThumbnails
|
||||
@Default(.showChapterThumbnailsOnlyWhenDifferent) private var showChapterThumbnailsOnlyWhenDifferent
|
||||
@Default(.showRelated) private var showRelated
|
||||
@Default(.showComments) private var showComments
|
||||
#if !os(tvOS)
|
||||
@Default(.showScrollToTopInComments) private var showScrollToTopInComments
|
||||
#endif
|
||||
@@ -300,6 +301,8 @@ struct VideoDetails: View {
|
||||
switch page {
|
||||
case .queue:
|
||||
return !sidebarQueue && player.isAdvanceToNextItemAvailable
|
||||
case .comments:
|
||||
return showComments
|
||||
default:
|
||||
return !video.isLocal
|
||||
}
|
||||
@@ -378,10 +381,12 @@ struct VideoDetails: View {
|
||||
PlayerQueueView(sidebarQueue: false)
|
||||
.padding(.horizontal)
|
||||
case .comments:
|
||||
CommentsView()
|
||||
.onAppear {
|
||||
comments.loadIfNeeded()
|
||||
}
|
||||
if showComments {
|
||||
CommentsView()
|
||||
.onAppear {
|
||||
comments.loadIfNeeded()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.bottom, 60)
|
||||
|
Reference in New Issue
Block a user