Skip to content

Commit

Permalink
[DEL/#309] 불필요한 매개변수 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Dec 20, 2024
1 parent 5ea0e4b commit 24d3ccd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,15 @@ 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
isYearNull = false
isFirstNullAndFirstChange = isFirst
}
},
onMonthChosen = { month, isNull, isFirst ->
onMonthChosen = { month, isFirst ->
if (month != null) {
currentStartMonth = month
isCheck = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
Expand Down Expand Up @@ -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))
Expand All @@ -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)
}
)
}
Expand Down

0 comments on commit 24d3ccd

Please sign in to comment.