Skip to content

Commit

Permalink
[MOD/#308] 정렬 기준 함수 이동
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyobeen-Park committed Dec 23, 2024
1 parent 26759f1 commit b892c1e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions feature/home/src/main/java/com/terning/feature/home/HomeRoute.kt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ fun HomeRoute(
viewModel.navigateCalendar()
},
updateRecommendDialogVisibility = viewModel::updateRecommendDialogVisibility,
updateSortingSheetVisibility = viewModel::updateSortingSheetVisibility,
updateSortBy = viewModel::updateSortBy,
getHomeUpcomingInternList = viewModel::getHomeUpcomingInternList,
getRecommendInternsData = viewModel::getRecommendInternsData,
viewModel = viewModel,
Expand All @@ -130,6 +132,8 @@ fun HomeScreen(
navigateToIntern: (Long) -> Unit,
navigateToCalendar: () -> Unit,
updateRecommendDialogVisibility: (Boolean) -> Unit,
updateSortingSheetVisibility: (Boolean) -> Unit,
updateSortBy: (Int) -> Unit,
getHomeUpcomingInternList: () -> Unit,
getRecommendInternsData: (Int) -> Unit,
viewModel: HomeViewModel,
Expand Down Expand Up @@ -163,7 +167,7 @@ fun HomeScreen(
if (homeState.sortingSheetVisibility) {
SortingBottomSheet(
onDismiss = {
viewModel.updateSortingSheetVisibility(false)
updateSortingSheetVisibility(false)
},
currentSortBy = homeState.sortBy.ordinal,
onSortChange = { sortBy ->
Expand All @@ -177,7 +181,7 @@ fun HomeScreen(
else -> "filtered_hits"
}
)
viewModel.updateSortBy(sortBy)
updateSortBy(sortBy)
}
)
}
Expand Down Expand Up @@ -309,7 +313,7 @@ fun HomeScreen(
Spacer(modifier = Modifier.weight(1f))
SortingButton(
sortBy = homeState.sortBy.ordinal,
onCLick = { viewModel.updateSortingSheetVisibility(true) },
onCLick = { updateSortingSheetVisibility(true) },
)
HomeFilteringScreen(
onChangeFilterClick = { changeFilteringSheetState = true },
Expand Down

0 comments on commit b892c1e

Please sign in to comment.