From ad86cc9d7707fa5e02da8ef429e730854e666fae Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Mon, 16 Sep 2024 14:41:05 +0900 Subject: [PATCH] =?UTF-8?q?[FIX/#241]=20=EC=BD=94=EB=93=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../filtering/filteringone/FilteringOneRoute.kt | 10 ++++++---- .../filtering/filteringtwo/FilteringTwoRoute.kt | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneRoute.kt b/feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneRoute.kt index f4c8df0e..28438e81 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneRoute.kt +++ b/feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneRoute.kt @@ -58,10 +58,12 @@ fun FilteringOneRoute( FilteringOneScreen( name = name, onButtonClick = { grade -> - if (grade.isNotEmpty()) { - viewModel.updateGrade(grade) - viewModel.updateButton(true) - } else viewModel.updateButton(false) + with(viewModel) { + if (grade.isNotEmpty()) { + updateGrade(grade) + updateButton(true) + } else updateButton(false) + } }, onNextClick = viewModel::navigateToFilteringTwo, navigateUp = viewModel::navigateUp, diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoRoute.kt b/feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoRoute.kt index 53f72278..facee419 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoRoute.kt +++ b/feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoRoute.kt @@ -63,10 +63,12 @@ fun FilteringTwoRoute( onNextClick = viewModel::navigateToFilteringThree, navigateUp = viewModel::navigateUp, onButtonClick = { workingPeriod -> - if (workingPeriod.isNotEmpty()) { - viewModel.updateWorkingPeriod(workingPeriod) - viewModel.updateButton(true) - } else viewModel.updateButton(false) + with(viewModel) { + if (workingPeriod.isNotEmpty()) { + updateWorkingPeriod(workingPeriod) + updateButton(true) + } else updateButton(false) + } }, buttonState = state.isButtonValid, workingPeriod = state.workingPeriod,