Skip to content

Commit

Permalink
[Refactor] #51 - updateRepeatType 메서드에서 변경 여부를 확인해 불필요한 업데이트 방지
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa-e1 committed Jan 18, 2025
1 parent 89f0611 commit b5cdbe6
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,13 @@ final class PickerButtonViewModel: BasePickerViewModel {
}

func updateRepeatType(_ type: RepeatType) {
repeatType = type
shouldShowEndRepeat = type != .none
if type == .none {
endRepeatDate = nil
isEndRepeatDateSelected = false
if repeatType != type {
repeatType = type
shouldShowEndRepeat = type != .none
if type == .none {
endRepeatDate = nil
isEndRepeatDateSelected = false
}
}
}

Expand Down

0 comments on commit b5cdbe6

Please sign in to comment.