Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REFACTOR/#193] 홈 뷰 리팩토링 #203

Merged
merged 23 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5dac493
[REFACTOR/#193] navController 전달 방식 수정
Hyobeen-Park Aug 23, 2024
2fc2aa6
[FEAT/#193] HomeState 구현
Hyobeen-Park Aug 23, 2024
0640f99
[REFACTOR/#193] 유저 이름 로직 수정
Hyobeen-Park Aug 23, 2024
6f3379f
[REFACTOR/#193] 필터링 정보 로직 수정
Hyobeen-Park Aug 23, 2024
89b5b60
[REFACTOR/#193] 오늘 마감 공고, 맟춤 공고 초기화 로직 수정
Hyobeen-Park Aug 23, 2024
e62c2b6
[CHORE/#193] getFilteringInfo() 함수 private으로 수정
Hyobeen-Park Aug 23, 2024
b398065
[REFACTOR/#193] 오늘 마감 공고 로직 수정
Hyobeen-Park Aug 23, 2024
b240a7e
[REFACTOR/#193] 맞춤 공고 로직 수정
Hyobeen-Park Aug 23, 2024
7e8eb45
[REFACTOR/#193] getRecommendInternsData 함수 파라미터 수정
Hyobeen-Park Aug 23, 2024
c39baf4
[CHORE/#193] 사용하지 않는 변수 삭제
Hyobeen-Park Aug 23, 2024
5928430
[REFACTOR/#193] 필터링 재설정 뷰 homeState 추가
Hyobeen-Park Aug 24, 2024
e2271c5
[REFACTOR/#193] 필터링 재설정 뷰 navController 전달 방식 수정
Hyobeen-Park Aug 24, 2024
e0714d5
[REFACTOR/#193] 홈 뷰 필터링 정보 초기화 부분 추가
Hyobeen-Park Aug 24, 2024
afe9a28
[CHORE/#193] 코드 정리
Hyobeen-Park Aug 24, 2024
0a0dfc7
[REFACTOR/#193] currentSortBy 파라미터 HomeScreen 안으로 이동
Hyobeen-Park Aug 24, 2024
2658844
Merge remote-tracking branch 'origin/develop' into refactor/#193-home
Hyobeen-Park Aug 26, 2024
bdbb2da
Merge remote-tracking branch 'origin/develop' into refactor/#193-home
Hyobeen-Park Aug 26, 2024
c6cf178
[CHORE/#193] conflict 해결
Hyobeen-Park Aug 26, 2024
06810b7
[CHORE/#193] conflict 해결
Hyobeen-Park Aug 26, 2024
5b3c983
[REFACTOR/#193] 홈 뷰 scaffold 제거
Hyobeen-Park Aug 26, 2024
710eeeb
[REFACTOR/#193] 홈 뷰모델 관련 로직 홈 스크린 내부로 이동
Hyobeen-Park Aug 26, 2024
90c1b9b
[CHORE/#193] 코드리뷰 반영 및 코드 정리
Hyobeen-Park Aug 30, 2024
2bfd7a4
Merge remote-tracking branch 'origin/develop' into refactor/#193-home
Hyobeen-Park Aug 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ fun ChangeFilterRoute(
val lifecycleOwner = LocalLifecycleOwner.current
val context = LocalContext.current

val filteringState by viewModel.homeFilteringState.collectAsStateWithLifecycle()
val homeState by viewModel.homeState.collectAsStateWithLifecycle()

when (filteringState) {
when (homeState.homeFilteringInfoState) {
is UiState.Success -> ChangeFilterScreen(
(filteringState as UiState.Success<HomeFilteringInfo>).data,
navController,
filterData = (homeState.homeFilteringInfoState as UiState.Success<HomeFilteringInfo>).data,
navigateToHome = { navController.popBackStack() },
viewModel,
)

Expand All @@ -75,7 +75,7 @@ fun ChangeFilterRoute(
@Composable
fun ChangeFilterScreen(
filterData: HomeFilteringInfo,
navController: NavController,
navigateToHome: () -> Unit,
viewModel: HomeViewModel,
) {
var currentGrade by remember { mutableIntStateOf(filterData.grade ?: -1) }
Expand All @@ -96,7 +96,7 @@ fun ChangeFilterScreen(
topBar = {
BackButtonTopAppBar(
title = stringResource(id = R.string.change_filter_top_bar_title),
onBackButtonClick = { navController.popBackStack() },
onBackButtonClick = navigateToHome,
modifier = Modifier
.shadow(elevation = 2.dp)
)
Expand Down
Loading
Loading