fix(creator): 커뮤니티 반응 순서를 조정한다
This commit is contained in:
@@ -188,6 +188,19 @@ struct CommunityPostCard: View {
|
||||
|
||||
private var reactionBar: some View {
|
||||
HStack(spacing: 15) {
|
||||
Button(action: onTapComment) {
|
||||
HStack(spacing: SodaSpacing.s4) {
|
||||
Image("ic_feed_community_reply")
|
||||
.resizable()
|
||||
.frame(width: 18, height: 18)
|
||||
|
||||
Text("\(commentCount)")
|
||||
.appFont(.body2)
|
||||
.foregroundColor(Color.gray400)
|
||||
}
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
|
||||
Button {
|
||||
toggleLike()
|
||||
} label: {
|
||||
@@ -202,19 +215,6 @@ struct CommunityPostCard: View {
|
||||
}
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
|
||||
Button(action: onTapComment) {
|
||||
HStack(spacing: SodaSpacing.s4) {
|
||||
Image("ic_feed_community_reply")
|
||||
.resizable()
|
||||
.frame(width: 18, height: 18)
|
||||
|
||||
Text("\(commentCount)")
|
||||
.appFont(.body2)
|
||||
.foregroundColor(Color.gray400)
|
||||
}
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
.frame(height: 24)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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) }
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -23,6 +23,10 @@ struct CreatorChannelCommunityPostDetailView: View {
|
||||
)
|
||||
|
||||
if detail.isCommentAvailable {
|
||||
Rectangle()
|
||||
.fill(Color.gray800)
|
||||
.frame(height: 1)
|
||||
|
||||
CreatorChannelCommunityPostDetailCommentListView(
|
||||
creatorId: detail.creatorId,
|
||||
postId: detail.postId,
|
||||
|
||||
Reference in New Issue
Block a user