-
Notifications
You must be signed in to change notification settings - Fork 0
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
[TNT-176] 트레이너, 트레이니 메인 네비게이션 기초 세팅 #64
Merged
Merged
Changes from 18 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
fd10026
[TNT-176] remove: 불필요한 코드 제거
hoyahozz 7dd11b1
[TNT-176] refactor: 회원가입 네비게이션 로직 개선
hoyahozz ffb5898
[TNT-176] chore: feature:trainer:home 모듈 최초 생성
hoyahozz d133796
[TNT-176] chore: feature:trainee:home 모듈 최초 생성
hoyahozz ce19dc9
[TNT-176] chore: feature:trainer:main 모듈 최초 생성
hoyahozz d065755
[TNT-176] feat: 트레이너 메인 Navigation 기초 구현
hoyahozz 18e2b5e
[TNT-176] chore: feature:trainer:feedback 모듈 최초 생성
hoyahozz a015414
[TNT-176] chore: feature:trainer:members 모듈 최초 생성
hoyahozz 75c5a86
[TNT-176] chore: feature:trainer:mypage 모듈 최초 생성
hoyahozz 8804a14
[TNT-176] feat: 트레이너 임시 MainTab 구현
hoyahozz 85cf8a2
[TNT-176] chore: feature:trainee:main 모듈 최초 생성
hoyahozz b4168e0
[TNT-176] feat: 트레이니 메인 Navigation 기초 구현
hoyahozz f9fb1ef
[TNT-176] refactor: Signup NavGraph 제거
hoyahozz e00f461
[TNT-176] remove: feature:home 모듈 제거
hoyahozz 96a6d92
[TNT-176] fix: MainScreen 내 scaffold inner padding 제거
hoyahozz 55b2e66
[TNT-176] fix: apply detekt
hoyahozz 153b238
[TNT-176] fix: MainScreen 내부에서 NavController 를 생성하도록 수정
hoyahozz 6abbc60
[TNT-176] fix: clearBackStack 로직 수정
hoyahozz 2714349
[TNT-176] Merge branch 'develop' into feature/TNT-176
hoyahozz fc1e747
[TNT-176] refactor: 알람 화면 Navigation 로직 이관 처리
hoyahozz 6d47a33
[TNT-176] refactor: UserType enum 생성 및 User 클래스 분리
hoyahozz c0fc779
[TNT-176] feat: 자동 로그인 후 직군에 따라 이동 화면 지정 처리
hoyahozz 5389e6f
[TNT-176] feat: 로그인 후 직군에 따라 이동 화면 지정 처리
hoyahozz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,20 +7,20 @@ import androidx.compose.ui.Modifier | |
import androidx.navigation.compose.NavHost | ||
import co.kr.tnt.feature.webview.navigateToWebView | ||
import co.kr.tnt.feature.webview.webViewScreen | ||
import co.kr.tnt.home.navigation.homeNavGraph | ||
import co.kr.tnt.home.navigation.navigateToHome | ||
import co.kr.tnt.login.navigation.loginScreen | ||
import co.kr.tnt.login.navigation.navigateToLogin | ||
import co.kr.tnt.navigation.Route | ||
import co.kr.tnt.roleselect.navigateToRoleSelection | ||
import co.kr.tnt.roleselect.roleSelectionScreen | ||
import co.kr.tnt.trainee.connect.navigation.navigateToTraineeConnect | ||
import co.kr.tnt.trainee.connect.navigation.traineeConnectScreen | ||
import co.kr.tnt.trainee.mypage.navigation.traineeMyPageScreen | ||
import co.kr.tnt.trainee.main.navigation.navigateToTraineeMain | ||
import co.kr.tnt.trainee.main.navigation.traineeMainScreen | ||
import co.kr.tnt.trainee.signup.navigation.navigateToTraineeSignUp | ||
import co.kr.tnt.trainee.signup.navigation.traineeSignUpScreen | ||
import co.kr.tnt.trainer.connect.navigation.navigateToTrainerConnect | ||
import co.kr.tnt.trainer.connect.navigation.trainerConnectScreen | ||
import co.kr.tnt.trainer.main.navigation.navigateToTrainerMain | ||
import co.kr.tnt.trainer.main.navigation.trainerMainScreen | ||
import co.kr.tnt.trainer.signup.navigation.navigateToTrainerSignUp | ||
import co.kr.tnt.trainer.signup.navigation.trainerSignUpScreen | ||
|
||
|
@@ -40,13 +40,7 @@ fun TnTNavHost( | |
) { | ||
loginScreen( | ||
navigateToHome = { | ||
navController.navigateToHome { | ||
popUpTo(Route.Login) { | ||
inclusive = true | ||
} | ||
launchSingleTop = true | ||
restoreState = true | ||
} | ||
navController.navigateToTraineeMain(clearBackStack = true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 여기 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 어라 이거 API 반영 됐었군요!.. 이따 집가서 수정해두겠습니다 '-' |
||
}, | ||
navigateToSignup = { loginResult -> | ||
navController.navigateToRoleSelection( | ||
|
@@ -57,53 +51,38 @@ fun TnTNavHost( | |
}, | ||
) | ||
roleSelectionScreen( | ||
navigateToTraineeSignUp = { authId, authType, email -> | ||
navController.navigateToTraineeSignUp( | ||
authId = authId, | ||
authType = authType, | ||
email = email, | ||
) | ||
}, | ||
navigateToTrainerSignUp = { authId, authType, email -> | ||
navController.navigateToTrainerSignUp( | ||
authId = authId, | ||
authType = authType, | ||
email = email, | ||
) | ||
}, | ||
navigateToTraineeSignUp = navController::navigateToTraineeSignUp, | ||
navigateToTrainerSignUp = navController::navigateToTrainerSignUp, | ||
) | ||
trainerSignUpScreen( | ||
navigateToPrevious = { navController.popBackStack() }, | ||
navigateToPrevious = navController::popBackStack, | ||
navigateToConnect = { navController.navigateToTrainerConnect(isFromMyPage = false) }, | ||
) | ||
traineeSignUpScreen( | ||
navigateToPrevious = { navController.popBackStack() }, | ||
navigateToPrevious = navController::popBackStack, | ||
navigateToConnect = { navController.navigateToTraineeConnect(isFromMyPage = false) }, | ||
) | ||
trainerConnectScreen( | ||
navigateToPrevious = { navController.popBackStack() }, | ||
navigateToHome = { | ||
navController.navigateToHome(clearBackStack = true) | ||
}, | ||
navigateToPrevious = navController::popBackStack, | ||
navigateToHome = { navController.navigateToTrainerMain(clearBackStack = true) }, | ||
) | ||
traineeConnectScreen( | ||
navigateToPrevious = { navController.popBackStack() }, | ||
navigateToHome = { | ||
navController.navigateToHome(clearBackStack = true) | ||
}, | ||
navigateToPrevious = navController::popBackStack, | ||
navigateToHome = { navController.navigateToTraineeMain(clearBackStack = true) }, | ||
) | ||
traineeMyPageScreen( | ||
navigateToPrevious = { navController.popBackStack() }, | ||
navigateToTraineeConnect = { navController.navigateToTraineeConnect(isFromMyPage = true) }, | ||
trainerMainScreen( | ||
navigateToConnect = { navController.navigateToTraineeConnect(true) }, | ||
navigateToWebView = navController::navigateToWebView, | ||
navigateToLogin = { navController.navigateToLogin(clearBackStack = true) }, | ||
) | ||
traineeMainScreen( | ||
navigateToConnect = { navController.navigateToTraineeConnect(true) }, | ||
navigateToWebView = navController::navigateToWebView, | ||
navigateToLogin = { navController.navigateToLogin(clearBackStack = true) }, | ||
navigateToWebView = { url -> | ||
navController.navigateToWebView(url = url) | ||
}, | ||
) | ||
webViewScreen( | ||
navigateToPrevious = { navController.popBackStack() }, | ||
navigateToPrevious = navController::popBackStack, | ||
) | ||
homeNavGraph() | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...main/java/co/kr/tnt/home/HomeViewModel.kt → .../tnt/trainee/home/TraineeHomeViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package co.kr.tnt.home | ||
package co.kr.tnt.trainee.home | ||
|
||
import androidx.lifecycle.ViewModel | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class HomeViewModel @Inject constructor() : ViewModel() | ||
class TraineeHomeViewModel @Inject constructor() : ViewModel() |
27 changes: 27 additions & 0 deletions
27
...ure/trainee/home/src/main/java/co/kr/tnt/trainee/home/navigation/TraineeHomeNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package co.kr.tnt.trainee.home.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.NavOptionsBuilder | ||
import androidx.navigation.compose.composable | ||
import androidx.navigation.compose.navigation | ||
import co.kr.tnt.navigation.Route | ||
import co.kr.tnt.trainee.home.TraineeHomeRoute | ||
|
||
fun NavController.navigateToTraineeHome( | ||
navOptions: NavOptionsBuilder.() -> Unit = {}, | ||
) = navigate( | ||
route = Route.TraineeHome, | ||
builder = navOptions, | ||
) | ||
|
||
fun NavGraphBuilder.traineeHomeNavGraph( | ||
homeDestination: NavGraphBuilder.() -> Unit = { }, | ||
) { | ||
navigation<Route.TraineeMainTab.Home>(startDestination = Route.TraineeHome) { | ||
composable<Route.TraineeHome> { | ||
TraineeHomeRoute() | ||
} | ||
homeDestination() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import co.kr.tnt.setNamespace | ||
|
||
plugins { | ||
id("tnt.android.feature") | ||
} | ||
|
||
android { | ||
setNamespace("feature.trainee.main") | ||
} | ||
|
||
dependencies { | ||
implementation(projects.feature.trainee.home) | ||
implementation(projects.feature.trainee.mypage) | ||
|
||
implementation(libs.kotlinx.immutable) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest /> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗,, 감사합니다