mirror of
https://github.com/yattee/yattee.git
synced 2026-10-27 23:17:18 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user