feat(creator): 커뮤니티 게시글 상세를 연결한다

This commit is contained in:
Yu Sung
2026-07-08 01:56:57 +09:00
parent f2d589eca2
commit c0369e6f58
23 changed files with 2187 additions and 138 deletions

View File

@@ -74,6 +74,38 @@ extension CreatorChannelReplyDetailDisplayItem {
)
}
init(communityPostDetail comment: CreatorChannelCommunityCommentResponse, creatorId: Int) {
let currentUserId = UserDefaults.int(forKey: .userId)
self.init(
id: comment.commentId,
source: .community,
writerId: comment.writerId,
nickname: comment.writerNickname,
profileImageUrl: comment.writerProfileImageUrl,
content: comment.content,
relativeTimeText: DateParser.relativeTimeText(fromUTC: comment.createdAtUtc, fallback: comment.createdAtUtc),
isSecret: comment.isSecret,
isMine: comment.writerId == currentUserId,
isCreatorReply: comment.writerId == creatorId
)
}
init(communityPostDetailReply reply: CreatorChannelCommunityReplyResponse, creatorId: Int) {
let currentUserId = UserDefaults.int(forKey: .userId)
self.init(
id: reply.commentId,
source: .community,
writerId: reply.writerId,
nickname: reply.writerNickname,
profileImageUrl: reply.writerProfileImageUrl,
content: reply.content,
relativeTimeText: reply.relativeTimeText(),
isSecret: false,
isMine: reply.writerId == currentUserId,
isCreatorReply: reply.writerId == creatorId
)
}
init(fanTalkReply: CreatorChannelFanTalkReplyResponse, creatorId: Int) {
let currentUserId = UserDefaults.int(forKey: .userId)
self.init(