Skip to content

Commit

Permalink
refactor: 메서드 네이밍 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
m6z1 committed Sep 13, 2024
1 parent a2793d3 commit cae03bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CafeteriaRepository(
}
}

fun fetchAnotherMenus(todayDay: Weekdays): List<DaysMenu> {
fun fetchDaysMenu(todayDay: Weekdays): List<DaysMenu> {
return DaysMenu.values().filter { menu ->
menu.operatingDays.contains(todayDay)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class CafeteriaViewModel(
viewModelScope.launch {
val dateToWeekday: Weekdays = Weekdays.from(selectedDate.dayOfWeek)
runCatching {
cafeteriaRepository.fetchAnotherMenus(dateToWeekday)
cafeteriaRepository.fetchDaysMenu(dateToWeekday)
}.onSuccess { daysMenu ->
val formatter = DecimalFormat("#,###")
val formattedMenuWithPrice = daysMenu.map { "${it.menuNameKr} ${formatter.format(it.price)}" }
Expand Down

0 comments on commit cae03bb

Please sign in to comment.