From b5cdbe6c17b3fc500065cd0d9b491a3fae6a8ae2 Mon Sep 17 00:00:00 2001 From: RAFA Date: Sat, 18 Jan 2025 18:51:36 +0900 Subject: [PATCH] =?UTF-8?q?[Refactor]=20#51=20-=20updateRepeatType=20?= =?UTF-8?q?=EB=A9=94=EC=84=9C=EB=93=9C=EC=97=90=EC=84=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20=EC=97=AC=EB=B6=80=EB=A5=BC=20=ED=99=95=EC=9D=B8?= =?UTF-8?q?=ED=95=B4=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModel/PickerButtonViewModel.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Memento-iOS/Memento-iOS/Source/Presentation/Add/Common/PickerButton/ViewModel/PickerButtonViewModel.swift b/Memento-iOS/Memento-iOS/Source/Presentation/Add/Common/PickerButton/ViewModel/PickerButtonViewModel.swift index 2cbcdcf..f216676 100644 --- a/Memento-iOS/Memento-iOS/Source/Presentation/Add/Common/PickerButton/ViewModel/PickerButtonViewModel.swift +++ b/Memento-iOS/Memento-iOS/Source/Presentation/Add/Common/PickerButton/ViewModel/PickerButtonViewModel.swift @@ -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 + } } }