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) } ) }