diff --git a/core/data/src/main/java/com/puzzle/data/repository/MatchingRepositoryImpl.kt b/core/data/src/main/java/com/puzzle/data/repository/MatchingRepositoryImpl.kt index 293d46bf..de09e694 100644 --- a/core/data/src/main/java/com/puzzle/data/repository/MatchingRepositoryImpl.kt +++ b/core/data/src/main/java/com/puzzle/data/repository/MatchingRepositoryImpl.kt @@ -28,6 +28,9 @@ class MatchingRepositoryImpl @Inject constructor( override suspend fun reportUser(userId: Int, reason: String): Result = matchingDataSource.reportUser(userId = userId, reason = reason) + override suspend fun refuseMatch(): Result = + matchingDataSource.refuseMatch() + override suspend fun blockUser(userId: Int): Result = matchingDataSource.blockUser(userId) override suspend fun blockContacts(phoneNumbers: List): Result = diff --git a/core/data/src/test/java/com/puzzle/data/fake/source/matching/FakeMatchingDataSource.kt b/core/data/src/test/java/com/puzzle/data/fake/source/matching/FakeMatchingDataSource.kt index b05ddfa0..9f70f4d9 100644 --- a/core/data/src/test/java/com/puzzle/data/fake/source/matching/FakeMatchingDataSource.kt +++ b/core/data/src/test/java/com/puzzle/data/fake/source/matching/FakeMatchingDataSource.kt @@ -65,6 +65,10 @@ class FakeMatchingDataSource : MatchingDataSource { override suspend fun getOpponentProfileImage(): Result = Result.success(opponentProfileImageData ?: GetOpponentProfileImageResponse(null)) + override suspend fun refuseMatch(): Result { + TODO("Not yet implemented") + } + override suspend fun reportUser(userId: Int, reason: String): Result = Result.success(Unit) diff --git a/core/domain/src/main/java/com/puzzle/domain/repository/MatchingRepository.kt b/core/domain/src/main/java/com/puzzle/domain/repository/MatchingRepository.kt index 0bb73bb6..6b499e80 100644 --- a/core/domain/src/main/java/com/puzzle/domain/repository/MatchingRepository.kt +++ b/core/domain/src/main/java/com/puzzle/domain/repository/MatchingRepository.kt @@ -5,6 +5,7 @@ import com.puzzle.domain.model.profile.Contact import com.puzzle.domain.model.profile.OpponentProfile interface MatchingRepository { + suspend fun refuseMatch(): Result suspend fun reportUser(userId: Int, reason: String): Result suspend fun getOpponentContacts(): Result> suspend fun blockUser(userId: Int): Result diff --git a/core/domain/src/test/kotlin/com/puzzle/domain/spy/repository/SpyMatchingRepository.kt b/core/domain/src/test/kotlin/com/puzzle/domain/spy/repository/SpyMatchingRepository.kt index c1b382cf..6020e809 100644 --- a/core/domain/src/test/kotlin/com/puzzle/domain/spy/repository/SpyMatchingRepository.kt +++ b/core/domain/src/test/kotlin/com/puzzle/domain/spy/repository/SpyMatchingRepository.kt @@ -30,6 +30,10 @@ class SpyMatchingRepository : MatchingRepository { return Result.success(Unit) } + override suspend fun refuseMatch(): Result { + TODO("Not yet implemented") + } + override suspend fun reportUser(userId: Int, reason: String): Result { TODO("Not yet implemented") } diff --git a/core/network/src/main/java/com/puzzle/network/api/PieceApi.kt b/core/network/src/main/java/com/puzzle/network/api/PieceApi.kt index 92aa3fdd..733573e8 100644 --- a/core/network/src/main/java/com/puzzle/network/api/PieceApi.kt +++ b/core/network/src/main/java/com/puzzle/network/api/PieceApi.kt @@ -111,6 +111,9 @@ interface PieceApi { @PUT("/api/profiles/valuePicks") suspend fun updateMyValuePicks(@Body updateMyValuePickRequests: UpdateMyValuePickRequests): Result> + @PUT("/api/matches/refuse") + suspend fun refuseMatch(): Result> + @PUT("/api/profiles/basic") suspend fun updateMyProfileBasic(@Body updateMyProfileBasicRequest: UpdateMyProfileBasicRequest): Result> diff --git a/core/network/src/main/java/com/puzzle/network/source/matching/MatchingDataSource.kt b/core/network/src/main/java/com/puzzle/network/source/matching/MatchingDataSource.kt index a2099b29..62accf81 100644 --- a/core/network/src/main/java/com/puzzle/network/source/matching/MatchingDataSource.kt +++ b/core/network/src/main/java/com/puzzle/network/source/matching/MatchingDataSource.kt @@ -8,6 +8,7 @@ import com.puzzle.network.model.matching.GetOpponentValuePicksResponse import com.puzzle.network.model.matching.GetOpponentValueTalksResponse interface MatchingDataSource { + suspend fun refuseMatch(): Result suspend fun reportUser(userId: Int, reason: String): Result suspend fun blockUser(userId: Int): Result suspend fun blockContacts(phoneNumbers: List): Result diff --git a/core/network/src/main/java/com/puzzle/network/source/matching/MatchingDataSourceImpl.kt b/core/network/src/main/java/com/puzzle/network/source/matching/MatchingDataSourceImpl.kt index 7747f40c..e9c95f6a 100644 --- a/core/network/src/main/java/com/puzzle/network/source/matching/MatchingDataSourceImpl.kt +++ b/core/network/src/main/java/com/puzzle/network/source/matching/MatchingDataSourceImpl.kt @@ -17,6 +17,9 @@ import javax.inject.Singleton class MatchingDataSourceImpl @Inject constructor( private val pieceApi: PieceApi ) : MatchingDataSource { + override suspend fun refuseMatch(): Result = + pieceApi.refuseMatch().unwrapData() + override suspend fun reportUser(userId: Int, reason: String): Result = pieceApi.reportUser(ReportUserRequest(userId = userId, reason = reason)).unwrapData() diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailScreen.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailScreen.kt index 90b3efee..f2c53a1f 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailScreen.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailScreen.kt @@ -93,9 +93,12 @@ internal fun MatchingDetailRoute( ) ) }, - onDeclineClick = { }, - onAcceptClick = { }, - onShowPicturesClick = { }, + onDeclineClick = { + viewModel.onIntent(MatchingDetailIntent.OnDeclineClick) + }, + onAcceptClick = { + viewModel.onIntent(MatchingDetailIntent.OnAcceptClick) + }, ) } @@ -107,7 +110,6 @@ private fun MatchingDetailScreen( onNextPageClick: () -> Unit, onMoreClick: () -> Unit, onDeclineClick: () -> Unit, - onShowPicturesClick: () -> Unit, onAcceptClick: () -> Unit, modifier: Modifier = Modifier, ) { @@ -134,7 +136,10 @@ private fun MatchingDetailScreen( leftButtonText = "뒤로", rightButtonText = "매칭 수락하기", onLeftButtonClick = { showDialog = false }, - onRightButtonClick = {}, + onRightButtonClick = { + showDialog = false + onAcceptClick() + }, ) }, onDismissRequest = { showDialog = false }, @@ -160,7 +165,10 @@ private fun MatchingDetailScreen( leftButtonText = "뒤로", rightButtonText = "매칭 거절하기", onLeftButtonClick = { showDialog = false }, - onRightButtonClick = {}, + onRightButtonClick = { + showDialog = false + onDeclineClick() + }, ) }, onDismissRequest = { showDialog = false }, @@ -204,7 +212,10 @@ private fun MatchingDetailScreen( MatchingDetailContent( state = state, onMoreClick = onMoreClick, - onDeclineClick = onDeclineClick, + onDeclineClick = { + dialogType = DialogType.DECLINE_MATCHING + showDialog = true + }, modifier = Modifier .fillMaxSize() .padding(top = topBarHeight, bottom = bottomBarHeight), @@ -236,12 +247,10 @@ private fun MatchingDetailScreen( onShowPicturesClick = { dialogType = DialogType.PROFILE_IMAGE_DETAIL showDialog = true - onShowPicturesClick() }, onAcceptClick = { dialogType = DialogType.ACCEPT_MATCHING showDialog = true - onAcceptClick() }, modifier = Modifier .fillMaxWidth() @@ -408,7 +417,6 @@ private fun MatchingDetailScreenPreview() { {}, {}, {}, - {}, ) } } diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailViewModel.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailViewModel.kt index e995d301..956304eb 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailViewModel.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/MatchingDetailViewModel.kt @@ -75,9 +75,23 @@ class MatchingDetailViewModel @AssistedInject constructor( MatchingDetailIntent.OnBlockClick -> onBlockClick() MatchingDetailIntent.OnReportClick -> onReportClick() MatchingDetailIntent.OnAcceptClick -> acceptMatching() + MatchingDetailIntent.OnDeclineClick -> declineMatching() } } + private fun declineMatching() = viewModelScope.launch { + matchingRepository.refuseMatch() + .onSuccess { + navigationHelper.navigate( + NavigationEvent.NavigateTo( + route = MatchingGraphDest.MatchingRoute, + popUpTo = true, + ) + ) + } + .onFailure { errorHelper.sendError(it) } + } + private fun setNextPage() { setState { copy(currentPage = MatchingDetailState.MatchingDetailPage.getNextPage(currentPage)) diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailIntent.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailIntent.kt index 58c50e02..98eb7914 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailIntent.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/detail/contract/MatchingDetailIntent.kt @@ -9,5 +9,6 @@ sealed class MatchingDetailIntent { data object OnReportClick : MatchingDetailIntent() data object OnBlockClick : MatchingDetailIntent() data object OnAcceptClick : MatchingDetailIntent() + data object OnDeclineClick : MatchingDetailIntent() data class OnMoreClick(val content: @Composable () -> Unit) : MatchingDetailIntent() } diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingScreen.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingScreen.kt index e2fe88ab..ecb7103e 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingScreen.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingScreen.kt @@ -47,13 +47,8 @@ internal fun MatchingRoute( MatchingScreen( state = state, onButtonClick = { viewModel.onIntent(MatchingIntent.OnButtonClick) }, - onMatchingDetailClick = { - viewModel.onIntent( - MatchingIntent.Navigate( - NavigationEvent.NavigateTo(MatchingGraphDest.MatchingDetailRoute) - ) - ) - }, + onMatchingDetailClick = { viewModel.onIntent(MatchingIntent.OnMatchingDetailClick) }, + onCheckMyProfileClick = {}, onEditProfileClick = { viewModel.onIntent(MatchingIntent.OnEditProfileClick) } @@ -65,6 +60,7 @@ internal fun MatchingScreen( state: MatchingState, onButtonClick: () -> Unit, onMatchingDetailClick: () -> Unit, + onCheckMyProfileClick: () -> Unit, onEditProfileClick: () -> Unit, ) { when (state.userRole) { @@ -72,7 +68,7 @@ internal fun MatchingScreen( isNotificationEnabled = state.isNotificationEnabled, isImageRejected = state.isImageRejected, isDescriptionRejected = state.isDescriptionRejected, - onCheckMyProfileClick = {}, + onCheckMyProfileClick = onCheckMyProfileClick, onEditProfileClick = onEditProfileClick, ) @@ -80,7 +76,7 @@ internal fun MatchingScreen( if (state.matchInfo == null) { MatchingWaitingScreen( isNotificationEnabled = state.isNotificationEnabled, - onCheckMyProfileClick = {}, + onCheckMyProfileClick = onCheckMyProfileClick, remainTime = state.formattedRemainWaitingTime, ) } else { @@ -88,7 +84,7 @@ internal fun MatchingScreen( MatchStatus.UNKNOWN -> MatchingLoadingScreen(isNotificationEnabled = state.isNotificationEnabled) MatchStatus.BLOCKED -> MatchingWaitingScreen( isNotificationEnabled = state.isNotificationEnabled, - onCheckMyProfileClick = {}, + onCheckMyProfileClick = onCheckMyProfileClick, remainTime = state.formattedRemainWaitingTime ) diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt index 23f81b0b..eef9196a 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/main/MatchingViewModel.kt @@ -70,8 +70,16 @@ class MatchingViewModel @AssistedInject constructor( private fun processIntent(intent: MatchingIntent) { when (intent) { MatchingIntent.OnButtonClick -> processOnButtonClick() - is MatchingIntent.Navigate -> navigationHelper.navigate(intent.navigationEvent) + is MatchingIntent.OnMatchingDetailClick -> navigationHelper.navigate( + NavigationEvent.NavigateTo( + MatchingGraphDest.MatchingDetailRoute + ) + ) + MatchingIntent.OnEditProfileClick -> moveToProfileRegisterScreen() + MatchingIntent.OnCheckMyProfileClick -> navigationHelper.navigate( + NavigationEvent.NavigateTo(MatchingGraphDest.ProfilePreviewRoute) + ) } } diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingIntent.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingIntent.kt index 44187d84..346f4a23 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingIntent.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/main/contract/MatchingIntent.kt @@ -1,9 +1,8 @@ package com.puzzle.matching.graph.main.contract -import com.puzzle.navigation.NavigationEvent - sealed class MatchingIntent { data object OnButtonClick : MatchingIntent() - data class Navigate(val navigationEvent: NavigationEvent) : MatchingIntent() + data object OnCheckMyProfileClick : MatchingIntent() + data object OnMatchingDetailClick : MatchingIntent() data object OnEditProfileClick : MatchingIntent() } diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/preview/ProfilePreviewScreen.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/preview/ProfilePreviewScreen.kt index a939d8e0..589d133b 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/graph/preview/ProfilePreviewScreen.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/preview/ProfilePreviewScreen.kt @@ -40,7 +40,7 @@ import com.puzzle.designsystem.component.PieceLoading import com.puzzle.designsystem.component.PieceRoundingOutlinedButton import com.puzzle.designsystem.component.PieceSubCloseTopBar import com.puzzle.designsystem.foundation.PieceTheme -import com.puzzle.domain.model.profile.OpponentProfile +import com.puzzle.domain.model.profile.MyProfileBasic import com.puzzle.matching.graph.preview.contract.ProfilePreviewIntent import com.puzzle.matching.graph.preview.contract.ProfilePreviewSideEffect import com.puzzle.matching.graph.preview.contract.ProfilePreviewState @@ -84,7 +84,7 @@ private fun ProfilePreviewScreen( if (showDialog) { PieceImageDialog( - imageUri = state.profile?.imageUrl, + imageUri = state.myProfileBasic?.imageUrl, buttonLabel = "매칭 수락하기", onDismissRequest = { showDialog = false }, isApproveButtonShow = false, @@ -166,7 +166,7 @@ private fun ProfilePreviewContent( modifier: Modifier = Modifier, ) { Box(modifier = modifier.fillMaxSize()) { - state.profile?.let { profile -> + if (state.myProfileBasic != null && state.myValuePicks.isNotEmpty() && state.myValueTalks.isNotEmpty()) { AnimatedContent( targetState = currentPage, transitionSpec = { @@ -177,33 +177,35 @@ private fun ProfilePreviewContent( when (it) { ProfilePreviewState.Page.BasicInfoPage -> BasicInfoPage( - nickName = profile.nickname, - selfDescription = profile.description, - birthYear = profile.birthYear, - age = profile.age, - height = profile.height, - weight = profile.weight, - location = profile.location, - job = profile.job, - smokingStatus = profile.smokingStatus, + nickName = state.myProfileBasic.nickname, + selfDescription = state.myProfileBasic.description, + birthYear = state.myProfileBasic.birthdate, + age = state.myProfileBasic.age, + height = state.myProfileBasic.height, + weight = state.myProfileBasic.weight, + location = state.myProfileBasic.location, + job = state.myProfileBasic.job, + smokingStatus = state.myProfileBasic.smokingStatus, ) ProfilePreviewState.Page.ValueTalkPage -> ValueTalkPage( - nickName = profile.nickname, - selfDescription = profile.description, - talkCards = profile.valueTalks, + nickName = state.myProfileBasic.nickname, + selfDescription = state.myProfileBasic.description, + talkCards = state.myValueTalks, ) ProfilePreviewState.Page.ValuePickPage -> ValuePickPage( - nickName = profile.nickname, - selfDescription = profile.description, - pickCards = profile.valuePicks, + nickName = state.myProfileBasic.nickname, + selfDescription = state.myProfileBasic.description, + pickCards = state.myValuePicks, ) } } - } ?: PieceLoading() + } else { + PieceLoading() + } } } @@ -295,20 +297,22 @@ private fun ProfilePreviewScreenPreview() { PieceTheme { ProfilePreviewScreen( state = ProfilePreviewState( - profile = OpponentProfile( + myProfileBasic = MyProfileBasic( description = "음악과 요리를 좋아하는", nickname = "수줍은 수달", - birthYear = "00", age = 25, height = 254, weight = 72, job = "개발자", location = "서울특별시", smokingStatus = "비흡연", - valueTalks = emptyList(), - valuePicks = emptyList(), imageUrl = "", - ) + birthdate = "20000101", + snsActivityLevel = "TODO()", + contacts = emptyList(), + ), + myValuePicks = emptyList(), + myValueTalks = emptyList(), ), onCloseClick = {}, ) diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/preview/ProfilePreviewViewModel.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/preview/ProfilePreviewViewModel.kt index 1bf521a7..2e620781 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/graph/preview/ProfilePreviewViewModel.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/preview/ProfilePreviewViewModel.kt @@ -44,17 +44,23 @@ class ProfilePreviewViewModel @AssistedInject constructor( private fun initProfilePreview() = viewModelScope.launch { val profileBasicJob = launch { profileRepository.retrieveMyProfileBasic() - .onSuccess { } + .onSuccess { + setState { copy(myProfileBasic = it) } + } .onFailure { errorHelper.sendError(it) } } val valueTalksJob = launch { - profileRepository.retrieveMyValuePicks() - .onSuccess { } + profileRepository.retrieveMyValueTalks() + .onSuccess { + setState { copy(myValueTalks = it) } + } .onFailure { errorHelper.sendError(it) } } val valuePicksJob = launch { - profileRepository.retrieveMyValueTalks() - .onSuccess { } + profileRepository.retrieveMyValuePicks() + .onSuccess { + setState { copy(myValuePicks = it) } + } .onFailure { errorHelper.sendError(it) } } diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/preview/contract/ProfilePreviewState.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/preview/contract/ProfilePreviewState.kt index 508b351b..e0f3abf0 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/graph/preview/contract/ProfilePreviewState.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/preview/contract/ProfilePreviewState.kt @@ -1,11 +1,15 @@ package com.puzzle.matching.graph.preview.contract import com.airbnb.mvrx.MavericksState -import com.puzzle.domain.model.profile.OpponentProfile +import com.puzzle.domain.model.profile.MyProfileBasic +import com.puzzle.domain.model.profile.MyValuePick +import com.puzzle.domain.model.profile.MyValueTalk data class ProfilePreviewState( val isLoading: Boolean = false, - val profile: OpponentProfile? = null, + val myProfileBasic: MyProfileBasic? = null, + val myValuePicks: List = emptyList(), + val myValueTalks: List = emptyList(), ) : MavericksState { enum class Page(val title: String) { diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/preview/page/ValuePickPage.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/preview/page/ValuePickPage.kt index 98fff546..01883cd4 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/graph/preview/page/ValuePickPage.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/preview/page/ValuePickPage.kt @@ -34,15 +34,14 @@ import com.puzzle.common.ui.CollapsingHeaderNestedScrollConnection import com.puzzle.designsystem.R import com.puzzle.designsystem.component.PieceSubButton import com.puzzle.designsystem.foundation.PieceTheme -import com.puzzle.domain.model.profile.AnswerOption -import com.puzzle.domain.model.profile.OpponentValuePick +import com.puzzle.domain.model.profile.MyValuePick import com.puzzle.matching.graph.detail.common.component.BasicInfoHeader @Composable internal fun ValuePickPage( nickName: String, selfDescription: String, - pickCards: List, + pickCards: List, modifier: Modifier = Modifier, ) { val density = LocalDensity.current @@ -100,7 +99,7 @@ internal fun ValuePickPage( @Composable private fun ValuePickCards( - pickCards: List, + pickCards: List, modifier: Modifier = Modifier, ) { LazyColumn( @@ -124,7 +123,7 @@ private fun ValuePickCards( @Composable private fun ValuePickCard( - valuePickQuestion: OpponentValuePick, + valuePickQuestion: MyValuePick, modifier: Modifier = Modifier, ) { Column( @@ -188,48 +187,7 @@ private fun ProfileValuePickPagePreview() { ValuePickPage( nickName = "nickName", selfDescription = "selfDescription", - pickCards = listOf( - OpponentValuePick( - category = "음주", - question = "사귀는 사람과 함께 술을 마시는 것을 좋아하나요?", - answerOptions = listOf( - AnswerOption(1, "함께 술을 즐기고 싶어요"), - AnswerOption(2, "같이 술을 즐길 수 없어도 괜찮아요") - ), - selectedAnswer = 1, - isSameWithMe = true, - ), - OpponentValuePick( - category = "만남 빈도", - question = "주말에 얼마나 자주 데이트를 하고싶나요?", - answerOptions = listOf( - AnswerOption(1, "주말에는 최대한 같이 있고 싶어요"), - AnswerOption(2, "하루 정도는 각자 보내고 싶어요") - ), - selectedAnswer = 1, - isSameWithMe = false, - ), - OpponentValuePick( - category = "연락 빈도", - question = "연인 사이에 얼마나 자주 연락하는게 좋은가요?", - answerOptions = listOf( - AnswerOption(1, "바빠도 최대한 자주 연락하고 싶어요"), - AnswerOption(2, "연락은 생각날 때만 종종 해도 괜찮아요") - ), - selectedAnswer = 1, - isSameWithMe = true, - ), - OpponentValuePick( - category = "연락 방식", - question = "연락할 때 어떤 방법을 더 좋아하나요?", - answerOptions = listOf( - AnswerOption(1, "전화보다는 문자나 카톡이 좋아요"), - AnswerOption(2, "문자나 카톡보다는 전화가 좋아요") - ), - selectedAnswer = 1, - isSameWithMe = false, - ), - ), + pickCards = emptyList(), ) } } diff --git a/feature/matching/src/main/java/com/puzzle/matching/graph/preview/page/ValueTalkPage.kt b/feature/matching/src/main/java/com/puzzle/matching/graph/preview/page/ValueTalkPage.kt index 65cbe6d7..7de89c77 100644 --- a/feature/matching/src/main/java/com/puzzle/matching/graph/preview/page/ValueTalkPage.kt +++ b/feature/matching/src/main/java/com/puzzle/matching/graph/preview/page/ValueTalkPage.kt @@ -32,14 +32,14 @@ import androidx.compose.ui.unit.dp import com.puzzle.common.ui.CollapsingHeaderNestedScrollConnection import com.puzzle.designsystem.R import com.puzzle.designsystem.foundation.PieceTheme -import com.puzzle.domain.model.profile.OpponentValueTalk +import com.puzzle.domain.model.profile.MyValueTalk import com.puzzle.matching.graph.detail.common.component.BasicInfoHeader @Composable internal fun ValueTalkPage( nickName: String, selfDescription: String, - talkCards: List, + talkCards: List, modifier: Modifier = Modifier, ) { val density = LocalDensity.current @@ -104,7 +104,7 @@ internal fun ValueTalkPage( @Composable private fun ValueTalkCards( - talkCards: List, + talkCards: List, modifier: Modifier = Modifier, ) { LazyColumn( @@ -129,7 +129,7 @@ private fun ValueTalkCards( @Composable private fun ValueTalkCard( - item: OpponentValueTalk, + item: MyValueTalk, idx: Int, modifier: Modifier = Modifier, ) { @@ -190,23 +190,7 @@ private fun ProfileValueTalkPagePreview() { ValueTalkPage( nickName = "수줍은 수달", selfDescription = "음악과 요리를 좋아하는", - talkCards = listOf( - OpponentValueTalk( - category = "꿈과 목표", - summary = "여행하며 문화 경험, LGBTQ+ 변화를 원해요.", - answer = "안녕하세요! 저는 삶의 매 순간을 소중히 여기며, 꿈과 목표를 이루기 위해 노력하는 사람입니다. 제 가장 큰 꿈은 여행을 통해 다양한 문화와 사람들을 경험하고, 그 과정에서 얻은 지혜를 나누는 것입니다. 또한, LGBTQ+ 커뮤니티를 위한 긍정적인 변화를 이끌어내고 싶습니다. 내가 이루고자 하는 목표는 나 자신을 발전시키고, 사랑하는 사람들과 함께 행복한 순간들을 만드는 것입니다. 서로의 꿈을 지지하며 함께 성장할 수 있는 관계를 기대합니다!", - ), - OpponentValueTalk( - category = "관심사와 취향", - summary = "음악, 요리, 하이킹을 좋아해요.", - answer = "저는 다양한 취미와 관심사를 가진 사람입니다. 음악을 사랑하여 콘서트에 자주 가고, 특히 인디 음악과 재즈에 매력을 느낍니다. 요리도 좋아해 새로운 레시피에 도전하는 것을 즐깁니다. 여행을 통해 새로운 맛과 문화를 경험하는 것도 큰 기쁨입니다. 또, 자연을 사랑해서 주말마다 하이킹이나 캠핑을 자주 떠납니다. 영화와 책도 좋아해, 좋은 이야기와 감동을 나누는 시간을 소중히 여깁니다. 서로의 취향을 공유하며 즐거운 시간을 보낼 수 있기를 기대합니다!", - ), - OpponentValueTalk( - category = "연애관", - summary = "서로 존중하고 신뢰하며, 함께 성장하는 관계를 원해요. ", - answer = "저는 연애에서 서로의 존중과 신뢰가 가장 중요하다고 생각합니다. 진정한 소통을 통해 서로의 감정을 이해하고, 함께 성장할 수 있는 관계를 원합니다. 일상 속 작은 것에도 감사하며, 서로의 꿈과 목표를 지지하고 응원하는 파트너가 되고 싶습니다. 또한, 유머와 즐거움을 잃지 않으며, 함께하는 순간들을 소중히 여기고 싶습니다. 사랑은 서로를 더 나은 사람으로 만들어주는 힘이 있다고 믿습니다. 서로에게 긍정적인 영향을 주며 행복한 시간을 함께하고 싶습니다!" - ) - ) + talkCards = emptyList() ) } } diff --git a/feature/setting/src/main/java/com/puzzle/setting/graph/main/SettingViewModel.kt b/feature/setting/src/main/java/com/puzzle/setting/graph/main/SettingViewModel.kt index c2333e1c..b127f93a 100644 --- a/feature/setting/src/main/java/com/puzzle/setting/graph/main/SettingViewModel.kt +++ b/feature/setting/src/main/java/com/puzzle/setting/graph/main/SettingViewModel.kt @@ -142,7 +142,9 @@ class SettingViewModel @AssistedInject constructor( setState { copy(isContactBlocked = !state.isContactBlocked) } syncBlockTime() } - .onFailure { errorHelper.sendError(it) } + .onFailure { + errorHelper.sendError(it) + } } }