From 808032152e2c0c27744a9ba2f126cf7d98aebc61 Mon Sep 17 00:00:00 2001 From: Max Heidinger Date: Wed, 22 Oct 2025 10:39:26 +0200 Subject: [PATCH] fix: fix regresion of comments not being displayed --- PReek/Models/Event.swift | 2 +- PReek/Views/PullRequestViews/CommentsView.swift | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PReek/Models/Event.swift b/PReek/Models/Event.swift index 7582768..1194ef5 100644 --- a/PReek/Models/Event.swift +++ b/PReek/Models/Event.swift @@ -89,7 +89,7 @@ struct Event: Identifiable, Equatable { id: UUID().uuidString, user: User.preview(login: "person-6"), time: Date().addingTimeInterval(-60), - data: EventCommentData(url: nil, comments: [Comment(id: UUID().uuidString, content: MarkdownContent("Hello World, this is some really long comment which basically has no content but it has to be long"), fileReference: nil, isReply: false)]), + data: EventCommentData(url: nil, comments: [Comment(id: UUID().uuidString, content: MarkdownContent("## Comment\n\nHello World, this is some really long comment which basically has no content but it has to be long"), fileReference: nil, isReply: false)]), pullRequestUrl: URL(string: "https://example.com")! ) static let previewReadyForReview = Event(id: UUID().uuidString, user: User.preview(login: "person-7"), time: Date().addingTimeInterval(-70), data: ReadyForReviewData(url: nil), pullRequestUrl: URL(string: "https://example.com")!) diff --git a/PReek/Views/PullRequestViews/CommentsView.swift b/PReek/Views/PullRequestViews/CommentsView.swift index 7b88a72..9164cac 100644 --- a/PReek/Views/PullRequestViews/CommentsView.swift +++ b/PReek/Views/PullRequestViews/CommentsView.swift @@ -5,7 +5,7 @@ struct CommentsView: View { var comments: [Comment] var body: some View { - LazyVStack(alignment: .leading, spacing: 5) { + VStack(alignment: .leading, spacing: 5) { ForEach(comments) { comment in CommentView(comment: comment) } @@ -43,4 +43,5 @@ private struct CommentView: View { return CommentsView(comments: comments) .padding() + .frame(height: 250) }