From 48b1093dac59407cf19ca79c18e389c745cacade Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 13 Sep 2023 16:54:24 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EB=8B=B5?= =?UTF-8?q?=EA=B8=80=20-=20=EB=8C=93=EA=B8=80=EC=9D=B4=20=EB=9E=9C?= =?UTF-8?q?=EB=8D=A4=EC=9C=BC=EB=A1=9C=20=EB=B3=B4=EC=9D=B4=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Comment/AudioContentCommentItemView.swift | 19 ++++++++++++------- .../Comment/AudioContentCommentListView.swift | 18 +----------------- .../Comment/AudioContentListReplyView.swift | 4 ++-- 3 files changed, 15 insertions(+), 26 deletions(-) diff --git a/SodaLive/Sources/Content/Detail/Comment/AudioContentCommentItemView.swift b/SodaLive/Sources/Content/Detail/Comment/AudioContentCommentItemView.swift index 75d9dde..3584e7e 100644 --- a/SodaLive/Sources/Content/Detail/Comment/AudioContentCommentItemView.swift +++ b/SodaLive/Sources/Content/Detail/Comment/AudioContentCommentItemView.swift @@ -9,10 +9,8 @@ import SwiftUI import Kingfisher struct AudioContentCommentItemView: View { - - @Binding var isDisabledNavigationLink: Bool - let contentCreatorId: Int + let audioContentId: Int let commentItem: GetAudioContentCommentListItem let isReplyComment: Bool let isShowPopupMenuButton: Bool @@ -120,9 +118,17 @@ struct AudioContentCommentItemView: View { .padding(.top, commentItem.donationCan > 0 ? 0 : 13.3) if !isReplyComment { - Text(commentItem.replyCount > 0 ? "답글 \(commentItem.replyCount)개" : "답글 쓰기") - .font(.custom(Font.medium.rawValue, size: 13.3)) - .foregroundColor(Color(hex: "9970ff")) + NavigationLink( + destination: AudioContentListReplyView( + creatorId: contentCreatorId, + audioContentId: audioContentId, + parentComment: commentItem + ) + ) { + Text(commentItem.replyCount > 0 ? "답글 \(commentItem.replyCount)개" : "답글 쓰기") + .font(.custom(Font.medium.rawValue, size: 13.3)) + .foregroundColor(Color(hex: "9970ff")) + } } } } @@ -145,7 +151,6 @@ struct AudioContentCommentItemView: View { .foregroundColor(Color(hex: "777777")) .onTapGesture { isModeModify = true - isDisabledNavigationLink = true isShowPopupMenu = false } } diff --git a/SodaLive/Sources/Content/Detail/Comment/AudioContentCommentListView.swift b/SodaLive/Sources/Content/Detail/Comment/AudioContentCommentListView.swift index a7c9463..afdfda8 100644 --- a/SodaLive/Sources/Content/Detail/Comment/AudioContentCommentListView.swift +++ b/SodaLive/Sources/Content/Detail/Comment/AudioContentCommentListView.swift @@ -19,8 +19,6 @@ struct AudioContentCommentListView: View { @State private var commentId: Int = 0 @State private var isShowDeletePopup: Bool = false - @State private var isDisabledNavigationLink: Bool = false - @State private var isShowReplyView: Bool = false var body: some View { NavigationView { @@ -105,18 +103,9 @@ struct AudioContentCommentListView: View { ForEach(0..