From 24d3ccdb3266decc52cf39b1663d79ee11c8a218 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Sat, 21 Dec 2024 02:40:15 +0900 Subject: [PATCH] =?UTF-8?q?[DEL/#309]=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EB=A7=A4=EA=B0=9C=EB=B3=80=EC=88=98=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/component/HomeFilteringBottomSheet.kt | 4 ++-- .../home/component/HomeYearMonthPicker.kt | 16 ++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/feature/home/src/main/java/com/terning/feature/home/component/HomeFilteringBottomSheet.kt b/feature/home/src/main/java/com/terning/feature/home/component/HomeFilteringBottomSheet.kt index 9ba7907d..e32abf55 100644 --- a/feature/home/src/main/java/com/terning/feature/home/component/HomeFilteringBottomSheet.kt +++ b/feature/home/src/main/java/com/terning/feature/home/component/HomeFilteringBottomSheet.kt @@ -174,7 +174,7 @@ fun HomeFilteringBottomSheet( HomeYearMonthPicker( chosenYear = defaultStartYear ?: Calendar.getInstance().currentYear, chosenMonth = defaultStartMonth ?: Calendar.getInstance().currentMonth, - onYearChosen = { year, isNull, isFirst -> + onYearChosen = { year, isFirst -> if (year != null) { currentStartYear = year isCheck = false @@ -182,7 +182,7 @@ fun HomeFilteringBottomSheet( isFirstNullAndFirstChange = isFirst } }, - onMonthChosen = { month, isNull, isFirst -> + onMonthChosen = { month, isFirst -> if (month != null) { currentStartMonth = month isCheck = false diff --git a/feature/home/src/main/java/com/terning/feature/home/component/HomeYearMonthPicker.kt b/feature/home/src/main/java/com/terning/feature/home/component/HomeYearMonthPicker.kt index 368fe5a0..a5a3a28b 100644 --- a/feature/home/src/main/java/com/terning/feature/home/component/HomeYearMonthPicker.kt +++ b/feature/home/src/main/java/com/terning/feature/home/component/HomeYearMonthPicker.kt @@ -58,8 +58,8 @@ fun HomeYearMonthPicker( modifier: Modifier = Modifier, chosenYear: Int?, chosenMonth: Int?, - onYearChosen: (Int?, Boolean, Boolean) -> Unit, - onMonthChosen: (Int?, Boolean, Boolean) -> Unit, + onYearChosen: (Int?, Boolean) -> Unit, + onMonthChosen: (Int?, Boolean) -> Unit, isYearNull: Boolean, isMonthNull: Boolean, years: List, @@ -92,11 +92,7 @@ fun HomeYearMonthPicker( startIndex = startYearIndex, onItemSelected = { year -> if (year == "-" && !isFirst) isFirst = true - onYearChosen( - if (year == "-") null else year.dropLast(1).toInt(), - year == "-", - isFirst - ) + onYearChosen(if (year == "-") null else year.dropLast(1).toInt(), isFirst) } ) Spacer(modifier = Modifier.width(18.dp)) @@ -107,11 +103,7 @@ fun HomeYearMonthPicker( startIndex = startMonthIndex, onItemSelected = { month -> if (month == "-" && !isFirst) isFirst = true - onMonthChosen( - if (month == "-") null else month.dropLast(1).toInt(), - month == "-", - isFirst - ) + onMonthChosen(if (month == "-") null else month.dropLast(1).toInt(), isFirst) } ) }