Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,9 @@ extension CalendarCardCVC {
}
self.attendanceButton.isHidden = (userType == .visitor || userType == .inactive)
}

func resetSubscription() {
self.cancelBag.cancel()
self.cancelBag = CancelBag()
}
Comment on lines +148 to +151
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

함수로 분리해주신 것 좋네요!

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ extension HomeForMemberVC {
func createCalendarCellRegistration() -> CalendarCellRegistration {
collectionView.createCellRegistration { [weak self] cell, _, item in
guard let self else { return }
cell.configureCell(model: item, userType: self.viewModel.userType)

cell.cancelBag.cancel()

cell.configureCell(model: item, userType: self.viewModel.userType)
cell.attendanceButtonTap
.withUnretained(self)
.sink { owner, _ in
Expand Down