Skip to content

Commit

Permalink
♻️#294: 마이페이지 탭 버튼 쓰로틀 추가, 리스트뷰 separator 미노출되는 이슈 처리, 네트워크 에러 토스트 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
thoonk committed Jul 11, 2024
1 parent b7783d3 commit 01b3f6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ private extension MusicListCell {
// MARK: - Separator View

self.addSubview(separatorView)
self.separatorView.snp.makeConstraints { make in
make.top.equalTo(self.snp.bottom)
separatorView.snp.makeConstraints { make in
make.leading.trailing.equalToSuperview()
make.bottom.equalToSuperview()
make.height.equalTo(1)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,13 +531,15 @@ private extension MyPageViewController {
private extension MyPageViewController {
func bindTapButtonAction(dropTapButton: UIButton, likeTapButton: UIButton) {
dropTapButton.rx.tap
.throttle(.seconds(2), scheduler: MainScheduler.instance)
.bind(with: self) { owner, _ in
owner.listTypeTapEvent.accept(.drop)
owner.updateTapListUI(by: .drop)
}
.disposed(by: disposeBag)

likeTapButton.rx.tap
.throttle(.seconds(2), scheduler: MainScheduler.instance)
.bind(with: self) { owner, _ in
owner.listTypeTapEvent.accept(.like)
owner.updateTapListUI(by: .like)
Expand Down Expand Up @@ -634,6 +636,7 @@ private extension MyPageViewController {

output.myMusicsSections
.bind(with: self) { owner, sections in
owner.updateCollectionViewHeight()
owner.displayMusicList(sections)
}
.disposed(by: disposeBag)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ private extension MyPageViewModel {
output.myMusicsSections.accept(myMusicsSections)
}, onFailure: { _, error in
print("❌Fetching My Drop List Error: \(error.localizedDescription)")
output.toast.accept("네트워크를 확인해 주세요")
})
.disposed(by: disposedBag)
}
Expand All @@ -159,6 +160,7 @@ private extension MyPageViewModel {
output.myMusicsSections.accept(myMusicsSections)
}, onFailure: { _, error in
print("❌Fetching My Like List Error: \(error.localizedDescription)")
output.toast.accept("네트워크를 확인해 주세요")
})
.disposed(by: disposedBag)
}
Expand Down

0 comments on commit 01b3f6d

Please sign in to comment.