feat(channel): 게시글 작성자 이동을 연결한다
This commit is contained in:
+18
-13
@@ -6,6 +6,7 @@ struct CreatorChannelCommunityPostDetailContentView: View {
|
||||
let detail: CreatorChannelCommunityPostDetailResponse
|
||||
let onTapLike: () -> Void
|
||||
let onTapPurchase: () -> Void
|
||||
let onTapCreator: () -> Void
|
||||
|
||||
@StateObject private var playManager = CreatorCommunityMediaPlayerManager.shared
|
||||
@StateObject private var contentPlayManager = ContentPlayManager.shared
|
||||
@@ -49,22 +50,26 @@ struct CreatorChannelCommunityPostDetailContentView: View {
|
||||
|
||||
private var header: some View {
|
||||
HStack(spacing: SodaSpacing.s8) {
|
||||
DownsampledKFImage(url: URL(string: detail.creatorProfileUrl), size: CGSize(width: 42, height: 42))
|
||||
.background(Color.gray800)
|
||||
.clipShape(Circle())
|
||||
.frame(width: 42, height: 42)
|
||||
HStack(spacing: SodaSpacing.s8) {
|
||||
DownsampledKFImage(url: URL(string: detail.creatorProfileUrl), size: CGSize(width: 42, height: 42))
|
||||
.background(Color.gray800)
|
||||
.clipShape(Circle())
|
||||
.frame(width: 42, height: 42)
|
||||
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(detail.creatorNickname)
|
||||
.appFont(size: 14, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
.lineLimit(1)
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(detail.creatorNickname)
|
||||
.appFont(size: 14, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
.lineLimit(1)
|
||||
|
||||
Text(detail.relativeTimeText())
|
||||
.appFont(size: 14, weight: .regular)
|
||||
.foregroundColor(Color.gray500)
|
||||
.lineLimit(1)
|
||||
Text(detail.relativeTimeText())
|
||||
.appFont(size: 14, weight: .regular)
|
||||
.foregroundColor(Color.gray500)
|
||||
.lineLimit(1)
|
||||
}
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture(perform: onTapCreator)
|
||||
|
||||
Spacer(minLength: 0)
|
||||
}
|
||||
|
||||
+6
-1
@@ -19,7 +19,8 @@ struct CreatorChannelCommunityPostDetailView: View {
|
||||
CreatorChannelCommunityPostDetailContentView(
|
||||
detail: detail,
|
||||
onTapLike: viewModel.toggleLike,
|
||||
onTapPurchase: viewModel.presentPurchaseDialog
|
||||
onTapPurchase: viewModel.presentPurchaseDialog,
|
||||
onTapCreator: { showCreatorChannel(creatorId: detail.creatorId) }
|
||||
)
|
||||
|
||||
if viewModel.isCommentInteractionAvailable {
|
||||
@@ -120,4 +121,8 @@ struct CreatorChannelCommunityPostDetailView: View {
|
||||
)
|
||||
}
|
||||
|
||||
private func showCreatorChannel(creatorId: Int) {
|
||||
AppState.shared.setAppStep(step: .creatorDetail(userId: creatorId))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user