fix(creator): 커뮤니티 반응 순서를 조정한다

This commit is contained in:
Yu Sung
2026-07-12 08:33:13 +09:00
parent 47fe0e787d
commit eaed309a1d
14 changed files with 86 additions and 54 deletions

View File

@@ -219,6 +219,18 @@ struct CreatorChannelCommunityListItem: View {
private var reactionBar: some View {
HStack(spacing: 15) {
if post.isCommentAvailable && !isPaidLocked {
HStack(spacing: SodaSpacing.s4) {
Image("ic_feed_community_reply")
.resizable()
.frame(width: 18, height: 18)
Text("\(post.commentCount)")
.appFont(size: 16, weight: .regular)
.foregroundColor(Color.gray400)
}
}
if !isPaidLocked {
Button {
localIsLike.toggle()
@@ -238,18 +250,6 @@ struct CreatorChannelCommunityListItem: View {
}
.buttonStyle(.plain)
}
if post.isCommentAvailable && !isPaidLocked {
HStack(spacing: SodaSpacing.s4) {
Image("ic_feed_community_reply")
.resizable()
.frame(width: 18, height: 18)
Text("\(post.commentCount)")
.appFont(size: 16, weight: .regular)
.foregroundColor(Color.gray400)
}
}
}
.frame(height: 24)
}

View File

@@ -21,24 +21,32 @@ struct CreatorChannelCommunityPostDetailCommentListView: View {
.foregroundColor(.white)
.padding(.horizontal, SodaSpacing.s14)
LazyVStack(alignment: .leading, spacing: SodaSpacing.s20) {
ForEach(comments, id: \.commentId) { comment in
ZStack(alignment: .topTrailing) {
CreatorChannelCommunityPostDetailCommentRow(
comment: comment,
creatorId: creatorId,
onTapReplyDetail: { onTapReplyDetail(comment) },
onTapMore: { onTapMore(comment) }
)
if selectedComment?.commentId == comment.commentId {
CreatorChannelActionPopup(
canEdit: canEdit(comment),
canDelete: canDelete(comment),
onTapEdit: { onTapEdit(comment) },
onTapDelete: { onTapDelete(comment) }
LazyVStack(alignment: .leading, spacing: SodaSpacing.s14) {
ForEach(Array(comments.enumerated()), id: \.element.commentId) { index, comment in
VStack(alignment: .leading, spacing: SodaSpacing.s14) {
ZStack(alignment: .topTrailing) {
CreatorChannelCommunityPostDetailCommentRow(
comment: comment,
creatorId: creatorId,
onTapReplyDetail: { onTapReplyDetail(comment) },
onTapMore: { onTapMore(comment) }
)
.padding(.top, 28)
if selectedComment?.commentId == comment.commentId {
CreatorChannelActionPopup(
canEdit: canEdit(comment),
canDelete: canDelete(comment),
onTapEdit: { onTapEdit(comment) },
onTapDelete: { onTapDelete(comment) }
)
.padding(.top, 28)
}
}
if index < comments.count - 1 {
Rectangle()
.fill(Color.gray800)
.frame(height: 1)
}
}
.onAppear { onAppearComment(comment) }

View File

@@ -155,6 +155,18 @@ struct CreatorChannelCommunityPostDetailContentView: View {
private var reactionBar: some View {
HStack(spacing: 15) {
if isPaidLocked == false {
if detail.isCommentAvailable {
HStack(spacing: SodaSpacing.s4) {
Image("ic_feed_community_reply")
.resizable()
.frame(width: 18, height: 18)
Text("\(detail.commentCount)")
.appFont(size: 16, weight: .regular)
.foregroundColor(Color.gray500)
}
}
Button(action: onTapLike) {
HStack(spacing: SodaSpacing.s4) {
Image(detail.isLiked ? "ic_feed_community_heart_fill" : "ic_feed_community_heart")
@@ -167,18 +179,6 @@ struct CreatorChannelCommunityPostDetailContentView: View {
}
}
.buttonStyle(.plain)
if detail.isCommentAvailable {
HStack(spacing: SodaSpacing.s4) {
Image("ic_feed_community_reply")
.resizable()
.frame(width: 18, height: 18)
Text("\(detail.commentCount)")
.appFont(size: 16, weight: .regular)
.foregroundColor(Color.gray500)
}
}
}
}
.frame(height: 24)

View File

@@ -23,6 +23,10 @@ struct CreatorChannelCommunityPostDetailView: View {
)
if detail.isCommentAvailable {
Rectangle()
.fill(Color.gray800)
.frame(height: 1)
CreatorChannelCommunityPostDetailCommentListView(
creatorId: detail.creatorId,
postId: detail.postId,