Skip to content

Commit

Permalink
[Feat] #186 - 3차 QA_투명도 매커니즘 수정 완료
Browse files Browse the repository at this point in the history
  • Loading branch information
boogios committed May 28, 2024
1 parent 4a28907 commit 012fc73
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -576,11 +576,8 @@ extension HomeViewController: UICollectionViewDataSource, UICollectionViewDelega
}
}

var memberGhost = self.homeViewModel.postDatas[indexPath.row].memberGhost
memberGhost = adjustGhostValue(memberGhost)

cell.nicknameLabel.text = homeViewModel.postDatas[indexPath.row].memberNickname
cell.transparentLabel.text = "투명도 \(memberGhost)%"
cell.transparentLabel.text = "투명도 \(homeViewModel.postDatas[indexPath.row].memberGhost)%"
cell.contentTextLabel.text = homeViewModel.postDatas[indexPath.row].contentText
cell.likeNumLabel.text = "\(homeViewModel.postDatas[indexPath.row].likedNumber)"
cell.commentNumLabel.text = "\(homeViewModel.postDatas[indexPath.row].commentNumber)"
Expand Down Expand Up @@ -613,11 +610,15 @@ extension HomeViewController: UICollectionViewDataSource, UICollectionViewDelega
}
}

var memberGhost = self.homeViewModel.postDatas[indexPath.row].memberGhost
memberGhost = adjustGhostValue(memberGhost)

// 내가 투명도를 누른 유저인 경우 -85% 적용
if self.homeViewModel.postDatas[indexPath.row].isGhost {
cell.grayView.alpha = 0.85
} else {
cell.grayView.alpha = CGFloat(Double(-memberGhost) / 100)
print("cell.grayView.alpha: \(CGFloat(Double(-memberGhost) / 100))")
}

// 탈퇴한 회원 닉네임 텍스트 색상 변경, 프로필로 이동 못하도록 적용
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,8 @@ extension MyPageCommentViewController: UICollectionViewDataSource, UICollectionV
NotificationCenter.default.post(name: MyPageCommentViewController.ghostButtonTapped, object: nil)
}

var memberGhost = commentDatas[indexPath.row].memberGhost
memberGhost = adjustGhostValue(memberGhost)

cell.nicknameLabel.text = commentDatas[indexPath.row].memberNickname
cell.transparentLabel.text = "투명도 \(memberGhost)%"
cell.transparentLabel.text = "투명도 \(commentDatas[indexPath.row].memberGhost)%"
cell.timeLabel.text = "\(commentDatas[indexPath.row].time.formattedTime())"
cell.contentTextLabel.text = commentDatas[indexPath.row].commentText
cell.likeNumLabel.text = "\(commentDatas[indexPath.row].commentLikedNumber)"
Expand Down Expand Up @@ -343,6 +340,9 @@ extension MyPageCommentViewController: UICollectionViewDataSource, UICollectionV

cell.commentStackView.isHidden = true

var memberGhost = commentDatas[indexPath.row].memberGhost
memberGhost = adjustGhostValue(memberGhost)

// 내가 투명도를 누른 유저인 경우 -85% 적용
if commentDatas[indexPath.row].isGhost {
cell.grayView.alpha = 0.85
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,8 @@ extension MyPageContentViewController: UICollectionViewDataSource, UICollectionV
NotificationCenter.default.post(name: MyPageContentViewController.ghostButtonTapped, object: nil)
}

var memberGhost = contentDatas[indexPath.row].memberGhost
memberGhost = adjustGhostValue(memberGhost)

cell.nicknameLabel.text = contentDatas[indexPath.row].memberNickname
cell.transparentLabel.text = "투명도 \(memberGhost)%"
cell.transparentLabel.text = "투명도 \(contentDatas[indexPath.row].memberGhost)%"
cell.timeLabel.text = "\(contentDatas[indexPath.row].time.formattedTime())"
cell.contentTextLabel.text = contentDatas[indexPath.row].contentText
cell.likeNumLabel.text = "\(contentDatas[indexPath.row].likedNumber)"
Expand Down Expand Up @@ -350,6 +347,9 @@ extension MyPageContentViewController: UICollectionViewDataSource, UICollectionV
}
}

var memberGhost = contentDatas[indexPath.row].memberGhost
memberGhost = adjustGhostValue(memberGhost)

// 내가 투명도를 누른 유저인 경우 -85% 적용
if contentDatas[indexPath.row].isGhost {
cell.grayView.alpha = 0.85
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,11 +692,8 @@ extension PostDetailViewController {
}

private func bindPostData(data: PostDetailResponseDTO) {

let memberGhost = adjustGhostValue(data.memberGhost)

self.postView.isGhost = data.isGhost
self.postView.memberGhost = memberGhost
self.postView.memberGhost = data.memberGhost
self.postView.isDeleted = data.isDeleted

self.collectionHeaderView?.profileImageView.load(url: data.memberProfileUrl)
Expand All @@ -705,7 +702,7 @@ extension PostDetailViewController {
self.postUserNickname = "\(data.memberNickname)"
self.userNickName = "\(data.memberNickname)"
self.postView.contentTextLabel.text = data.contentText
self.postView.transparentLabel.text = "투명도 \(memberGhost)%"
self.postView.transparentLabel.text = "투명도 \(data.memberGhost)%"
self.postView.timeLabel.text = data.time.formattedTime()
self.postView.likeNumLabel.text = "\(data.likedNumber)"
self.postView.commentNumLabel.text = "\(data.commentNumber)"
Expand All @@ -721,6 +718,8 @@ extension PostDetailViewController {
self.userNickName = "\(data.memberNickname)"
self.contentText = "\(data.contentText)"

let memberGhost = adjustGhostValue(data.memberGhost)

// 내가 투명도를 누른 유저인 경우 -85% 적용
if data.isGhost {
self.collectionHeaderView?.grayView.alpha = 0.85
Expand Down Expand Up @@ -858,11 +857,8 @@ extension PostDetailViewController: UICollectionViewDataSource, UICollectionView
}
}

var memberGhost = viewModel.postReplyDatas[indexPath.row].memberGhost
memberGhost = adjustGhostValue(memberGhost)

cell.nicknameLabel.text = viewModel.postReplyDatas[indexPath.row].memberNickname
cell.transparentLabel.text = "투명도 \(memberGhost)%"
cell.transparentLabel.text = "투명도 \(viewModel.postReplyDatas[indexPath.row].memberGhost)%"
cell.contentTextLabel.text = viewModel.postReplyDatas[indexPath.row].commentText
cell.likeNumLabel.text = "\(viewModel.postReplyDatas[indexPath.row].commentLikedNumber)"
cell.timeLabel.text = "\(viewModel.postReplyDatas[indexPath.row].time.formattedTime())"
Expand Down Expand Up @@ -894,6 +890,9 @@ extension PostDetailViewController: UICollectionViewDataSource, UICollectionView
}
}

var memberGhost = viewModel.postReplyDatas[indexPath.row].memberGhost
memberGhost = adjustGhostValue(memberGhost)

// 내가 투명도를 누른 유저인 경우 -85% 적용
if self.viewModel.postReplyDatas[indexPath.row].isGhost {
cell.grayView.alpha = 0.85
Expand Down

0 comments on commit 012fc73

Please sign in to comment.