Skip to content

Commit

Permalink
♻️ :: [#201] MassageViewController / 데이터가 없을 경우의 화면 표시 코드 리팩토링
Browse files Browse the repository at this point in the history
  • Loading branch information
baekteun committed Oct 4, 2023
1 parent 6dbab9f commit 9df3586
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ final class MassageViewController: BaseStoredViewController<MassageStore> {
private let massageNavigationBarLabel = DotoriNavigationBarLabel(text: L10n.Massage.massageTitle)
private let massageTableView = UITableView()
.set(\.backgroundColor, .clear)
.set(\.isHidden, true)
.set(\.separatorStyle, .none)
.set(\.sectionHeaderHeight, 0)
.then {
Expand Down Expand Up @@ -96,11 +95,9 @@ final class MassageViewController: BaseStoredViewController<MassageStore> {
sharedState
.map(\.massageRankList)
.map(\.isEmpty)
.not()
.removeDuplicates()
.sink(with: self, receiveValue: { owner, massageIsEmpty in
owner.massageTableView.isHidden = massageIsEmpty
owner.emptySelfStudyStackView.isHidden = !massageIsEmpty
})
.assign(to: \.isHidden, on: emptySelfStudyStackView)
.store(in: &subscription)
}
}

0 comments on commit 9df3586

Please sign in to comment.