feat(creator): 커뮤니티 게시글 상세를 연결한다
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user