diff --git a/core/navigation/src/main/java/com/puzzle/navigation/Route.kt b/core/navigation/src/main/java/com/puzzle/navigation/Route.kt index a2984cc5..cd1aceca 100644 --- a/core/navigation/src/main/java/com/puzzle/navigation/Route.kt +++ b/core/navigation/src/main/java/com/puzzle/navigation/Route.kt @@ -10,6 +10,12 @@ data object AuthGraph : Route sealed class AuthGraphDest : Route { @Serializable data object AuthRoute : AuthGraphDest() + + @Serializable + data object AuthVerificationRoute : AuthGraphDest() + + @Serializable + data object AuthRegistrationRoute : AuthGraphDest() } @Serializable diff --git a/feature/auth/src/main/java/com/puzzle/auth/AuthScreen.kt b/feature/auth/src/main/java/com/puzzle/auth/AuthScreen.kt deleted file mode 100644 index bc09bb1e..00000000 --- a/feature/auth/src/main/java/com/puzzle/auth/AuthScreen.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.puzzle.auth - -import android.util.Log -import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.unit.sp -import androidx.hilt.navigation.compose.hiltViewModel -import com.kakao.sdk.user.UserApiClient -import com.puzzle.navigation.AuthGraph -import com.puzzle.navigation.MatchingGraph -import com.puzzle.navigation.NavigationEvent - -@Composable -fun AuthRoute(viewModel: AuthViewModel = hiltViewModel()) { - val context = LocalContext.current - - Column( - modifier = Modifier - .fillMaxSize() - .clickable { - viewModel.navigationHelper.navigate( - NavigationEvent.NavigateTo( - route = MatchingGraph, - popUpTo = AuthGraph, - ) - ) - }, - ) { - Text( - text = "카카오 로그인", - fontSize = 30.sp, - modifier = Modifier.clickable { - UserApiClient.instance.loginWithKakaoAccount(context) { token, error -> - if (error != null) { - Log.e("test", "로그인 실패", error) - } else if (token != null) { - Log.i("test", "로그인 성공 ${token.accessToken}") - } - } - } - ) - - Text( - text = "AuthRoute", - fontSize = 30.sp, - ) - } -} - -@Composable -fun AuthScreen() { -} \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/AuthViewModel.kt b/feature/auth/src/main/java/com/puzzle/auth/AuthViewModel.kt deleted file mode 100644 index 9e2d0a94..00000000 --- a/feature/auth/src/main/java/com/puzzle/auth/AuthViewModel.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.puzzle.auth - -import androidx.lifecycle.ViewModel -import com.puzzle.navigation.NavigationHelper -import dagger.hilt.android.lifecycle.HiltViewModel -import javax.inject.Inject - -@HiltViewModel -class AuthViewModel @Inject constructor( - val navigationHelper: NavigationHelper, -) : ViewModel() {} \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/main/AuthScreen.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/main/AuthScreen.kt new file mode 100644 index 00000000..7592ed6d --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/main/AuthScreen.kt @@ -0,0 +1,60 @@ +package com.puzzle.auth.graph.main + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.platform.LocalContext +import com.airbnb.mvrx.compose.collectAsState +import com.airbnb.mvrx.compose.mavericksViewModel + +@Composable +fun AuthRoute( + viewModel: AuthViewModel = mavericksViewModel(), +) { + val state by viewModel.collectAsState() + val context = LocalContext.current + + AuthScreen( + + ) +} + +@Composable +fun AuthScreen() { +// Column( +// modifier = Modifier +// .fillMaxSize() +// .clickable { +// viewModel.navigationHelper.navigate( +// NavigationEvent.NavigateTo( +// route = MatchingGraph, +// popUpTo = AuthGraph, +// ) +// ) +// }, +// ) { +// Text( +// text = "카카오 로그인", +// fontSize = 30.sp, +// modifier = Modifier.clickable { +// UserApiClient.instance.loginWithKakaoAccount(context) { token, error -> +// if (error != null) { +// Log.e("test", "로그인 실패", error) +// } else if (token != null) { +// Log.i("test", "로그인 성공 ${token.accessToken}") +// } +// } +// } +// ) +// +// Text( +// text = "AuthRoute", +// fontSize = 30.sp, +// ) +// } +} + +//@Preview +//@Composable +//fun PreviewAuthScreen() { +// +//} \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/main/AuthViewModel.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/main/AuthViewModel.kt new file mode 100644 index 00000000..3e2b66da --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/main/AuthViewModel.kt @@ -0,0 +1,25 @@ +package com.puzzle.auth.graph.main + +import com.airbnb.mvrx.MavericksViewModel +import com.airbnb.mvrx.MavericksViewModelFactory +import com.airbnb.mvrx.hilt.AssistedViewModelFactory +import com.airbnb.mvrx.hilt.hiltMavericksViewModelFactory +import com.puzzle.auth.graph.main.contract.AuthState +import com.puzzle.navigation.NavigationHelper +import dagger.assisted.Assisted +import dagger.assisted.AssistedFactory +import dagger.assisted.AssistedInject + +class AuthViewModel @AssistedInject constructor( + @Assisted initialState: AuthState, + private val navigationHelper: NavigationHelper, +) : MavericksViewModel(initialState) { + + @AssistedFactory + interface Factory : AssistedViewModelFactory { + override fun create(state: AuthState): AuthViewModel + } + + companion object : + MavericksViewModelFactory by hiltMavericksViewModelFactory() +} \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/main/contract/AuthIntent.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/main/contract/AuthIntent.kt new file mode 100644 index 00000000..db5398f6 --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/main/contract/AuthIntent.kt @@ -0,0 +1,3 @@ +package com.puzzle.auth.graph.main.contract + +class AuthIntent \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/main/contract/AuthSideEffect.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/main/contract/AuthSideEffect.kt new file mode 100644 index 00000000..fcda07a5 --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/main/contract/AuthSideEffect.kt @@ -0,0 +1,3 @@ +package com.puzzle.auth.graph.main.contract + +class AuthSideEffect \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/main/contract/AuthState.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/main/contract/AuthState.kt new file mode 100644 index 00000000..a6598ab7 --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/main/contract/AuthState.kt @@ -0,0 +1,7 @@ +package com.puzzle.auth.graph.main.contract + +import com.airbnb.mvrx.MavericksState + +data class AuthState( + val a: Boolean = false, +) : MavericksState \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/registration/AuthRegistrationScreen.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/registration/AuthRegistrationScreen.kt new file mode 100644 index 00000000..b396ff44 --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/registration/AuthRegistrationScreen.kt @@ -0,0 +1,13 @@ +package com.puzzle.auth.graph.registration + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import com.airbnb.mvrx.compose.collectAsState +import com.airbnb.mvrx.compose.mavericksViewModel + +@Composable +internal fun AuthRegistrationScreen( + viewModel: AuthRegistrationViewModel = mavericksViewModel() +) { + val state by viewModel.collectAsState() +} diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/registration/AuthRegistrationViewModel.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/registration/AuthRegistrationViewModel.kt new file mode 100644 index 00000000..d150668e --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/registration/AuthRegistrationViewModel.kt @@ -0,0 +1,25 @@ +package com.puzzle.auth.graph.registration + +import com.airbnb.mvrx.MavericksViewModel +import com.airbnb.mvrx.MavericksViewModelFactory +import com.airbnb.mvrx.hilt.AssistedViewModelFactory +import com.airbnb.mvrx.hilt.hiltMavericksViewModelFactory +import com.puzzle.auth.graph.registration.contract.AuthRegistrationState +import com.puzzle.navigation.NavigationHelper +import dagger.assisted.Assisted +import dagger.assisted.AssistedFactory +import dagger.assisted.AssistedInject + +class AuthRegistrationViewModel @AssistedInject constructor( + @Assisted initialState: AuthRegistrationState, + private val navigationHelper: NavigationHelper, +) : MavericksViewModel(initialState) { + + @AssistedFactory + interface Factory : AssistedViewModelFactory { + override fun create(state: AuthRegistrationState): AuthRegistrationViewModel + } + + companion object : + MavericksViewModelFactory by hiltMavericksViewModelFactory() +} \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/registration/contract/AuthRegistrationIntent.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/registration/contract/AuthRegistrationIntent.kt new file mode 100644 index 00000000..f7124b5a --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/registration/contract/AuthRegistrationIntent.kt @@ -0,0 +1,3 @@ +package com.puzzle.auth.graph.registration.contract + +sealed class AuthRegistrationIntent \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/registration/contract/AuthRegistrationSideEffect.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/registration/contract/AuthRegistrationSideEffect.kt new file mode 100644 index 00000000..dfdecf65 --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/registration/contract/AuthRegistrationSideEffect.kt @@ -0,0 +1,3 @@ +package com.puzzle.auth.graph.registration.contract + +sealed class AuthRegistrationSideEffect \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/registration/contract/AuthRegistrationState.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/registration/contract/AuthRegistrationState.kt new file mode 100644 index 00000000..5226f254 --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/registration/contract/AuthRegistrationState.kt @@ -0,0 +1,7 @@ +package com.puzzle.auth.graph.registration.contract + +import com.airbnb.mvrx.MavericksState + +data class AuthRegistrationState( + val a: Boolean = false, +) : MavericksState \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/verification/AuthVerificationScreen.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/verification/AuthVerificationScreen.kt new file mode 100644 index 00000000..74c7acb0 --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/verification/AuthVerificationScreen.kt @@ -0,0 +1,13 @@ +package com.puzzle.auth.graph.verification + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import com.airbnb.mvrx.compose.collectAsState +import com.airbnb.mvrx.compose.mavericksViewModel + +@Composable +internal fun AuthVerificationRoute( + viewModel: AuthVerificationViewModel = mavericksViewModel() +) { + val state by viewModel.collectAsState() +} diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/verification/AuthVerificationViewModel.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/verification/AuthVerificationViewModel.kt new file mode 100644 index 00000000..83ce35fe --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/verification/AuthVerificationViewModel.kt @@ -0,0 +1,24 @@ +package com.puzzle.auth.graph.verification + +import com.airbnb.mvrx.MavericksViewModel +import com.airbnb.mvrx.MavericksViewModelFactory +import com.airbnb.mvrx.hilt.AssistedViewModelFactory +import com.airbnb.mvrx.hilt.hiltMavericksViewModelFactory +import com.puzzle.auth.graph.verification.contract.AuthVerficationState +import com.puzzle.navigation.NavigationHelper +import dagger.assisted.Assisted +import dagger.assisted.AssistedFactory +import dagger.assisted.AssistedInject + +class AuthVerificationViewModel @AssistedInject constructor( + @Assisted initialState: AuthVerficationState, + private val navigationHelper: NavigationHelper, +) : MavericksViewModel(initialState) { + @AssistedFactory + interface Factory : AssistedViewModelFactory { + override fun create(state: AuthVerficationState): AuthVerificationViewModel + } + + companion object : + MavericksViewModelFactory by hiltMavericksViewModelFactory() +} diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/verification/contract/AuthVerficationState.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/verification/contract/AuthVerficationState.kt new file mode 100644 index 00000000..9bc78c0e --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/verification/contract/AuthVerficationState.kt @@ -0,0 +1,7 @@ +package com.puzzle.auth.graph.verification.contract + +import com.airbnb.mvrx.MavericksState + +data class AuthVerficationState( + val a: Boolean = false, +) : MavericksState \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/verification/contract/AuthVerificationIntent.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/verification/contract/AuthVerificationIntent.kt new file mode 100644 index 00000000..30110cbc --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/verification/contract/AuthVerificationIntent.kt @@ -0,0 +1,3 @@ +package com.puzzle.auth.graph.verification.contract + +sealed class AuthVerificationIntent \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/graph/verification/contract/AuthVerificationSideEffect.kt b/feature/auth/src/main/java/com/puzzle/auth/graph/verification/contract/AuthVerificationSideEffect.kt new file mode 100644 index 00000000..6d0de496 --- /dev/null +++ b/feature/auth/src/main/java/com/puzzle/auth/graph/verification/contract/AuthVerificationSideEffect.kt @@ -0,0 +1,3 @@ +package com.puzzle.auth.graph.verification.contract + +sealed class AuthVerificationSideEffect \ No newline at end of file diff --git a/feature/auth/src/main/java/com/puzzle/auth/navigation/AuthNavigation.kt b/feature/auth/src/main/java/com/puzzle/auth/navigation/AuthNavigation.kt index 72f3ce6d..f915be46 100644 --- a/feature/auth/src/main/java/com/puzzle/auth/navigation/AuthNavigation.kt +++ b/feature/auth/src/main/java/com/puzzle/auth/navigation/AuthNavigation.kt @@ -3,7 +3,7 @@ package com.puzzle.auth.navigation import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable import androidx.navigation.navigation -import com.puzzle.auth.AuthRoute +import com.puzzle.auth.graph.main.AuthRoute import com.puzzle.navigation.AuthGraph import com.puzzle.navigation.AuthGraphDest diff --git a/feature/matching/src/main/java/com/puzzle/matching/detail/component/BasicInfoHeader.kt b/feature/matching/src/main/java/com/puzzle/matching/common/component/BasicInfoHeader.kt similarity index 97% rename from feature/matching/src/main/java/com/puzzle/matching/detail/component/BasicInfoHeader.kt rename to feature/matching/src/main/java/com/puzzle/matching/common/component/BasicInfoHeader.kt index b04660fe..3bf40348 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/detail/component/BasicInfoHeader.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/common/component/BasicInfoHeader.kt @@ -1,4 +1,4 @@ -package com.puzzle.matching.detail.component +package com.puzzle.matching.common.component import androidx.compose.foundation.Image import androidx.compose.foundation.clickable diff --git a/feature/matching/src/main/java/com/puzzle/matching/ui/DialogType.kt b/feature/matching/src/main/java/com/puzzle/matching/common/constant/DialogType.kt similarity index 68% rename from feature/matching/src/main/java/com/puzzle/matching/ui/DialogType.kt rename to feature/matching/src/main/java/com/puzzle/matching/common/constant/DialogType.kt index 83edec2e..4e0a1141 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/ui/DialogType.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/common/constant/DialogType.kt @@ -1,4 +1,4 @@ -package com.puzzle.matching.ui +package com.puzzle.matching.common.constant enum class DialogType { ACCEPT_MATCHING, diff --git a/feature/matching/src/main/java/com/puzzle/matching/detail/content/BasicInfoBody.kt b/feature/matching/src/main/java/com/puzzle/matching/common/ui/BasicInfoBody.kt similarity index 98% rename from feature/matching/src/main/java/com/puzzle/matching/detail/content/BasicInfoBody.kt rename to feature/matching/src/main/java/com/puzzle/matching/common/ui/BasicInfoBody.kt index 082701fd..3ef8288b 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/detail/content/BasicInfoBody.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/common/ui/BasicInfoBody.kt @@ -1,4 +1,4 @@ -package com.puzzle.matching.detail.content +package com.puzzle.matching.common.ui import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -21,7 +21,7 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.puzzle.designsystem.R import com.puzzle.designsystem.foundation.PieceTheme -import com.puzzle.matching.detail.component.BasicInfoHeader +import com.puzzle.matching.common.component.BasicInfoHeader @Composable internal fun BasicInfoBody( diff --git a/feature/matching/src/main/java/com/puzzle/matching/detail/content/ValuePickBody.kt b/feature/matching/src/main/java/com/puzzle/matching/common/ui/ValuePickBody.kt similarity index 99% rename from feature/matching/src/main/java/com/puzzle/matching/detail/content/ValuePickBody.kt rename to feature/matching/src/main/java/com/puzzle/matching/common/ui/ValuePickBody.kt index f624df95..9e224d6c 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/detail/content/ValuePickBody.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/common/ui/ValuePickBody.kt @@ -1,4 +1,4 @@ -package com.puzzle.matching.detail.content +package com.puzzle.matching.common.ui import androidx.compose.foundation.Image import androidx.compose.foundation.background @@ -45,7 +45,7 @@ import com.puzzle.designsystem.R import com.puzzle.designsystem.component.PieceSubButton import com.puzzle.designsystem.foundation.PieceTheme import com.puzzle.domain.model.matching.ValuePick -import com.puzzle.matching.detail.component.BasicInfoHeader +import com.puzzle.matching.common.component.BasicInfoHeader @Composable internal fun ValuePickBody( diff --git a/feature/matching/src/main/java/com/puzzle/matching/detail/content/ValueTalkBody.kt b/feature/matching/src/main/java/com/puzzle/matching/common/ui/ValueTalkBody.kt similarity index 98% rename from feature/matching/src/main/java/com/puzzle/matching/detail/content/ValueTalkBody.kt rename to feature/matching/src/main/java/com/puzzle/matching/common/ui/ValueTalkBody.kt index a6e72226..73c01090 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/detail/content/ValueTalkBody.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/common/ui/ValueTalkBody.kt @@ -1,4 +1,4 @@ -package com.puzzle.matching.detail.content +package com.puzzle.matching.common.ui import androidx.compose.foundation.Image import androidx.compose.foundation.background @@ -32,7 +32,7 @@ import com.puzzle.common.ui.CollapsingHeaderNestedScrollConnection import com.puzzle.designsystem.R import com.puzzle.designsystem.foundation.PieceTheme import com.puzzle.domain.model.matching.ValueTalk -import com.puzzle.matching.detail.component.BasicInfoHeader +import com.puzzle.matching.common.component.BasicInfoHeader @Composable internal fun ValueTalkBody( diff --git a/feature/matching/src/main/java/com/puzzle/matching/contract/MatchingSideEffect.kt b/feature/matching/src/main/java/com/puzzle/matching/contract/MatchingSideEffect.kt deleted file mode 100644 index bc40ac8b..00000000 --- a/feature/matching/src/main/java/com/puzzle/matching/contract/MatchingSideEffect.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.puzzle.matching.contract - -sealed class MatchingSideEffect \ No newline at end of file diff --git a/feature/matching/src/main/java/com/puzzle/matching/detail/contract/MatchingDetailSideEffect.kt b/feature/matching/src/main/java/com/puzzle/matching/detail/contract/MatchingDetailSideEffect.kt deleted file mode 100644 index 01cc04a6..00000000 --- a/feature/matching/src/main/java/com/puzzle/matching/detail/contract/MatchingDetailSideEffect.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.puzzle.matching.detail.contract - -sealed class MatchingDetailSideEffect \ No newline at end of file diff --git a/feature/matching/src/main/java/com/puzzle/matching/detail/MatchingDetailRoute.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailRoute.kt similarity index 96% rename from feature/matching/src/main/java/com/puzzle/matching/detail/MatchingDetailRoute.kt rename to feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailRoute.kt index 546ca027..ff849695 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/detail/MatchingDetailRoute.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailRoute.kt @@ -1,4 +1,4 @@ -package com.puzzle.matching.detail +package com.puzzle.matching.graph.detail import androidx.compose.foundation.Image import androidx.compose.foundation.background @@ -37,15 +37,13 @@ import com.puzzle.designsystem.component.PieceImageDialog import com.puzzle.designsystem.component.PieceRoundingButton import com.puzzle.designsystem.component.PieceSubCloseTopBar import com.puzzle.designsystem.foundation.PieceTheme -import com.puzzle.domain.model.matching.ValuePick -import com.puzzle.domain.model.matching.ValueTalk -import com.puzzle.matching.detail.content.BasicInfoBody -import com.puzzle.matching.detail.content.ValuePickBody -import com.puzzle.matching.detail.content.ValueTalkBody -import com.puzzle.matching.detail.contract.MatchingDetailIntent -import com.puzzle.matching.detail.contract.MatchingDetailState -import com.puzzle.matching.detail.contract.MatchingDetailState.MatchingDetailPage -import com.puzzle.matching.ui.DialogType +import com.puzzle.matching.common.constant.DialogType +import com.puzzle.matching.common.ui.BasicInfoBody +import com.puzzle.matching.common.ui.ValuePickBody +import com.puzzle.matching.common.ui.ValueTalkBody +import com.puzzle.matching.graph.detail.contract.MatchingDetailIntent +import com.puzzle.matching.graph.detail.contract.MatchingDetailState +import com.puzzle.matching.graph.detail.contract.MatchingDetailState.MatchingDetailPage import com.skydoves.cloudy.cloudy @Composable diff --git a/feature/matching/src/main/java/com/puzzle/matching/detail/MatchingDetailViewModel.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailViewModel.kt similarity index 91% rename from feature/matching/src/main/java/com/puzzle/matching/detail/MatchingDetailViewModel.kt rename to feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailViewModel.kt index b868425b..bd944543 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/detail/MatchingDetailViewModel.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailViewModel.kt @@ -1,12 +1,12 @@ -package com.puzzle.matching.detail +package com.puzzle.matching.graph.detail import com.airbnb.mvrx.MavericksViewModel import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.hilt.AssistedViewModelFactory import com.airbnb.mvrx.hilt.hiltMavericksViewModelFactory -import com.puzzle.matching.detail.contract.MatchingDetailIntent -import com.puzzle.matching.detail.contract.MatchingDetailSideEffect -import com.puzzle.matching.detail.contract.MatchingDetailState +import com.puzzle.matching.graph.detail.contract.MatchingDetailIntent +import com.puzzle.matching.graph.detail.contract.MatchingDetailSideEffect +import com.puzzle.matching.graph.detail.contract.MatchingDetailState import com.puzzle.navigation.NavigationEvent import com.puzzle.navigation.NavigationHelper import dagger.assisted.Assisted diff --git a/feature/matching/src/main/java/com/puzzle/matching/detail/contract/MatchingDetailIntent.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailIntent.kt similarity index 84% rename from feature/matching/src/main/java/com/puzzle/matching/detail/contract/MatchingDetailIntent.kt rename to feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailIntent.kt index 592bb104..ffd0ead4 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/detail/contract/MatchingDetailIntent.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailIntent.kt @@ -1,4 +1,4 @@ -package com.puzzle.matching.detail.contract +package com.puzzle.matching.graph.detail.contract sealed class MatchingDetailIntent { data object OnMatchingDetailCloseClick : MatchingDetailIntent() diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailSideEffect.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailSideEffect.kt new file mode 100644 index 00000000..6999abea --- /dev/null +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailSideEffect.kt @@ -0,0 +1,3 @@ +package com.puzzle.matching.graph.detail.contract + +sealed class MatchingDetailSideEffect \ No newline at end of file diff --git a/feature/matching/src/main/java/com/puzzle/matching/detail/contract/MatchingDetailState.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailState.kt similarity index 96% rename from feature/matching/src/main/java/com/puzzle/matching/detail/contract/MatchingDetailState.kt rename to feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailState.kt index 07e88364..b8023ee8 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/detail/contract/MatchingDetailState.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailState.kt @@ -1,4 +1,4 @@ -package com.puzzle.matching.detail.contract +package com.puzzle.matching.graph.detail.contract import com.airbnb.mvrx.MavericksState import com.puzzle.domain.model.matching.ValuePick diff --git a/feature/matching/src/main/java/com/puzzle/matching/MatchingScreen.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingScreen.kt similarity index 98% rename from feature/matching/src/main/java/com/puzzle/matching/MatchingScreen.kt rename to feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingScreen.kt index 9db06406..169db0c7 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/MatchingScreen.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingScreen.kt @@ -1,4 +1,4 @@ -package com.puzzle.matching +package com.puzzle.matching.graph.main import androidx.compose.foundation.Image import androidx.compose.foundation.background @@ -40,8 +40,8 @@ import com.puzzle.designsystem.R import com.puzzle.designsystem.component.PieceMainTopBar import com.puzzle.designsystem.component.PieceSolidButton import com.puzzle.designsystem.foundation.PieceTheme -import com.puzzle.matching.contract.MatchingIntent -import com.puzzle.matching.contract.MatchingState +import com.puzzle.matching.graph.main.contract.MatchingIntent +import com.puzzle.matching.graph.main.contract.MatchingState @Composable internal fun MatchingRoute( diff --git a/feature/matching/src/main/java/com/puzzle/matching/MatchingViewModel.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt similarity index 90% rename from feature/matching/src/main/java/com/puzzle/matching/MatchingViewModel.kt rename to feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt index 3548ed1a..c24ec096 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/MatchingViewModel.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt @@ -1,12 +1,12 @@ -package com.puzzle.matching +package com.puzzle.matching.graph.main import com.airbnb.mvrx.MavericksViewModel import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.hilt.AssistedViewModelFactory import com.airbnb.mvrx.hilt.hiltMavericksViewModelFactory -import com.puzzle.matching.contract.MatchingIntent -import com.puzzle.matching.contract.MatchingSideEffect -import com.puzzle.matching.contract.MatchingState +import com.puzzle.matching.graph.main.contract.MatchingIntent +import com.puzzle.matching.graph.main.contract.MatchingSideEffect +import com.puzzle.matching.graph.main.contract.MatchingState import com.puzzle.navigation.MatchingGraphDest import com.puzzle.navigation.NavigationEvent.NavigateTo import com.puzzle.navigation.NavigationHelper diff --git a/feature/matching/src/main/java/com/puzzle/matching/contract/MatchingIntent.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingIntent.kt similarity index 65% rename from feature/matching/src/main/java/com/puzzle/matching/contract/MatchingIntent.kt rename to feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingIntent.kt index 956d6af9..b2fd2b34 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/contract/MatchingIntent.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingIntent.kt @@ -1,4 +1,4 @@ -package com.puzzle.matching.contract +package com.puzzle.matching.graph.main.contract sealed class MatchingIntent { data object NavigateToMatchingDetail : MatchingIntent() diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingSideEffect.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingSideEffect.kt new file mode 100644 index 00000000..7904a70a --- /dev/null +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingSideEffect.kt @@ -0,0 +1,3 @@ +package com.puzzle.matching.graph.main.contract + +sealed class MatchingSideEffect \ No newline at end of file diff --git a/feature/matching/src/main/java/com/puzzle/matching/contract/MatchingState.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingState.kt similarity index 71% rename from feature/matching/src/main/java/com/puzzle/matching/contract/MatchingState.kt rename to feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingState.kt index 3dff0434..37aa5db7 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/contract/MatchingState.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingState.kt @@ -1,4 +1,4 @@ -package com.puzzle.matching.contract +package com.puzzle.matching.graph.main.contract import com.airbnb.mvrx.MavericksState diff --git a/feature/matching/src/main/java/com/puzzle/matching/navigation/MatchingNavigation.kt b/feature/matching/src/main/java/com/puzzle/matching/navigation/MatchingNavigation.kt index bde8122d..e5876444 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/navigation/MatchingNavigation.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/navigation/MatchingNavigation.kt @@ -3,8 +3,8 @@ package com.puzzle.matching.navigation import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable import androidx.navigation.navigation -import com.puzzle.matching.MatchingRoute -import com.puzzle.matching.detail.MatchingDetailRoute +import com.puzzle.matching.graph.detail.MatchingDetailRoute +import com.puzzle.matching.graph.main.MatchingRoute import com.puzzle.navigation.MatchingGraph import com.puzzle.navigation.MatchingGraphDest diff --git a/feature/setting/src/main/java/com/puzzle/setting/navigation/SettingNavigation.kt b/feature/setting/src/main/java/com/puzzle/setting/navigation/SettingNavigation.kt index 6b047673..64607c0e 100644 --- a/feature/setting/src/main/java/com/puzzle/setting/navigation/SettingNavigation.kt +++ b/feature/setting/src/main/java/com/puzzle/setting/navigation/SettingNavigation.kt @@ -2,8 +2,8 @@ package com.puzzle.setting.navigation import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable -import com.puzzle.setting.SettingRoute import com.puzzle.navigation.SettingRoute +import com.puzzle.setting.SettingRoute fun NavGraphBuilder.settingScreen() { composable { diff --git a/presentation/src/main/java/com/puzzle/presentation/di/ViewModelsModule.kt b/presentation/src/main/java/com/puzzle/presentation/di/ViewModelsModule.kt index 87734136..aeaacb28 100644 --- a/presentation/src/main/java/com/puzzle/presentation/di/ViewModelsModule.kt +++ b/presentation/src/main/java/com/puzzle/presentation/di/ViewModelsModule.kt @@ -3,8 +3,11 @@ package com.puzzle.presentation.di import com.airbnb.mvrx.hilt.AssistedViewModelFactory import com.airbnb.mvrx.hilt.MavericksViewModelComponent import com.airbnb.mvrx.hilt.ViewModelKey -import com.puzzle.matching.MatchingViewModel -import com.puzzle.matching.detail.MatchingDetailViewModel +import com.puzzle.auth.graph.main.AuthViewModel +import com.puzzle.auth.graph.registration.AuthRegistrationViewModel +import com.puzzle.auth.graph.verification.AuthVerificationViewModel +import com.puzzle.matching.graph.detail.MatchingDetailViewModel +import com.puzzle.matching.graph.main.MatchingViewModel import dagger.Binds import dagger.Module import dagger.hilt.InstallIn @@ -23,4 +26,19 @@ interface ViewModelsModule { @IntoMap @ViewModelKey(MatchingDetailViewModel::class) fun matchingDetailViewModelFactory(factory: MatchingDetailViewModel.Factory): AssistedViewModelFactory<*, *> + + @Binds + @IntoMap + @ViewModelKey(MatchingDetailViewModel::class) + fun authViewModelFactory(factory: AuthViewModel.Factory): AssistedViewModelFactory<*, *> + + @Binds + @IntoMap + @ViewModelKey(MatchingDetailViewModel::class) + fun authRegistrationViewModelFactory(factory: AuthRegistrationViewModel.Factory): AssistedViewModelFactory<*, *> + + @Binds + @IntoMap + @ViewModelKey(MatchingDetailViewModel::class) + fun authVerificationViewModelFactory(factory: AuthVerificationViewModel.Factory): AssistedViewModelFactory<*, *> }