Honor the comments avatars setting in the overlay and pill, align replies without avatars

The "Author Avatars" toggle only reached the iPad/macOS comments page.
The expanded comments overlay now takes the same flag (hosts pass it in
the next commit), and the expanded comments pill shows the comments icon
instead of the author avatar when avatars are off.

The replies block in a comment used a hardcoded 44pt leading inset for
the avatar column regardless of the toggle, so "Show replies" was
indented past the comment text when avatars were hidden. The toggle now
aligns with the text (44pt with avatars, 0 without) and nested replies
keep a smaller 16pt inset without avatars so the hierarchy still reads.
This commit is contained in:
Arkadiusz Fal
2026-09-26 23:21:37 +02:00
parent 4210b0ab05
commit 0b2cb4deeb
3 changed files with 26 additions and 8 deletions

View File

@@ -19,6 +19,8 @@ struct ExpandedCommentsView: View {
// Panel resize drag callbacks
var onDragChanged: ((CGFloat) -> Void)? = nil
var onDragEnded: ((CGFloat, CGFloat) -> Void)? = nil
/// Whether comment rows show author avatars (comments page setting).
var showAvatars: Bool = true
@State private var showScrollButton = false
@State private var scrollToTopTrigger: Int = 0
@@ -223,7 +225,7 @@ struct ExpandedCommentsView: View {
@ViewBuilder
private var commentsContent: some View {
CommentsListContent(videoID: videoID)
CommentsListContent(videoID: videoID, showAvatars: showAvatars)
}
@ViewBuilder