Skip to content

Commit

Permalink
[Fix] RangkingView - 내 랭킹보기 버튼 조건 추가 (Nickname이 있으면 보이도록)
Browse files Browse the repository at this point in the history
  • Loading branch information
elesahich committed Apr 14, 2024
1 parent 859449f commit 2c9188c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions SOPT-iOS/Projects/Core/Sources/Literals/StringLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ public struct I18N {

public struct ListDetail {
public static let imagePlaceHolder = "달성 사진을 올려주세요"
public static let memoPlaceHolder = "메모를 작성해주세요"
public static let memoPlaceHolder = "함께한 사람과 어떤 추억을 남겼는지 작성해 주세요."
public static let mission = "미션"
public static let missionComplete = "미션 완료"
public static let editComplete = "수정 완료"
public static let editCompletedToast = "수정 완료되었습니다."
public static let deleteTitle = "달성한 미션을 삭제하시겠습니까?"
public static let missionDatePlaceHolder = "날짜를 입력해주세요"
public static let missionDatePlaceHolder = "날짜를 입력해주세요."
public static let datePickerDoneButtonTitle = "완료"
public static let datePickerCancelButtonTitle = "취소"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ extension STChartRectangleView {
make.height.equalTo(32.f)
make.centerY.equalToSuperview().inset(3)
}

rankLabel.snp.makeConstraints { make in
make.center.equalToSuperview()
}
} else {
self.addSubviews(rankLabel, rectangleView, usernameContainerView)

Expand All @@ -188,8 +192,7 @@ extension STChartRectangleView {
rectangleView.addSubview(scoreLabel)

scoreLabel.snp.makeConstraints { make in
make.top.equalToSuperview().inset(8.adjusted)
make.centerX.equalToSuperview()
make.center.equalToSuperview()
}

rectangleView.snp.makeConstraints { make in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class RankingVC: UIViewController, RankingViewControllable {
attributedStr.addAttribute(NSAttributedString.Key.kern, value: 0, range: NSMakeRange(0, attributedStr.length))
attributedStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.white, range: NSMakeRange(0, attributedStr.length))
bt.setAttributedTitle(attributedStr, for: .normal)
bt.isHidden = true
return bt
}()

Expand Down Expand Up @@ -162,6 +163,17 @@ extension RankingVC {
)

let output = self.viewModel.transform(from: input, cancelBag: self.cancelBag)

output.$rankingListModel
.sink { [weak self] model in
guard
let self,
let name = UserDefaultKeyList.User.soptampName,
model.contains(where: { $0.username == name })
else { return }

self.showMyRankingFloatingButton.isHidden = false
}.store(in: self.cancelBag)

output.$rankingListModel
.dropFirst(2)
Expand Down

0 comments on commit 2c9188c

Please sign in to comment.