Skip to content

Commit

Permalink
[Feat] sopt-makers#325 - Kok 버튼 바인딩
Browse files Browse the repository at this point in the history
lsj8706 committed Dec 17, 2023
1 parent 96e729d commit 859bc93
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -19,11 +19,13 @@ public final class PokeFriendsSectionGroupView: UIView {
typealias UserId = String

lazy var headerRightButtonTap: Driver<PokeRelation> = headerView.rightButtonTap.map { self.relation }.asDriver()
lazy var kokButtonTap = PassthroughSubject<UserId?, Never>()
let kokButtonTap = PassthroughSubject<UserId?, Never>()

private let relation: PokeRelation
private let maxContentsCount: Int

let cancelBag = CancelBag()

// MARK: - UI Components

private let headerView = PokeFriendsSectionHeaderView()
@@ -63,6 +65,9 @@ extension PokeFriendsSectionGroupView {
for _ in 0..<self.maxContentsCount {
let profileListView = PokeProfileListView(viewType: .default).setDividerViewIsHidden(to: false)
profileListView.isHidden = true
profileListView.kokButtonTap.sink { [weak self] userId in
self?.kokButtonTap.send(userId)
}.store(in: cancelBag)
self.contentStackView.addArrangedSubview(profileListView)
}
}

0 comments on commit 859bc93

Please sign in to comment.