diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt index 17578a28..8e7b1d0b 100644 --- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt +++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchScreen.kt @@ -1,5 +1,7 @@ package com.moneymong.moneymong.feature.agency.search +import android.content.Intent +import android.net.Uri import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -18,6 +20,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp @@ -55,6 +58,7 @@ fun AgencySearchScreen( navigateAgencyJoin: (agencyId: Long) -> Unit ) { val state by viewModel.collectAsState() + val context = LocalContext.current val pagingItems = viewModel.agencies.collectAsLazyPagingItems() viewModel.collectSideEffect { @@ -66,6 +70,11 @@ fun AgencySearchScreen( is AgencySearchSideEffect.NavigateToAgencyJoin -> { navigateAgencyJoin(it.agencyId) } + + is AgencySearchSideEffect.FollowAsk -> { + val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://asked.kr/moneymong")) + context.startActivity(intent) + } } } @@ -100,6 +109,7 @@ fun AgencySearchScreen( viewModel.navigateToJoin(agencyId) } }, + onClickFeedbackItem = viewModel::onClickAskFeedback, isLoading = state.isLoading, isError = state.isError, errorMessage = state.errorMessage, @@ -133,6 +143,7 @@ private fun AgencySearchContentView( modifier: Modifier = Modifier, pagingItems: LazyPagingItems, onClickItem: (agencyId: Long) -> Unit, + onClickFeedbackItem: () -> Unit, isLoading: Boolean, isError: Boolean, errorMessage: String, @@ -157,18 +168,18 @@ private fun AgencySearchContentView( }, ) } else { - if (pagingItems.itemCount != 0) { + if (pagingItems.itemCount == 0) { ContentViewWithoutAgencies( modifier = modifier, pagingItems = pagingItems, - onClickFeedbackItem = {} + onClickFeedbackItem = onClickFeedbackItem ) } else { ContentViewWithAgencies( modifier = modifier, pagingItems = pagingItems, onClickItem = onClickItem, - onClickFeedbackItem = {} + onClickFeedbackItem = onClickFeedbackItem ) } } diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchSideEffect.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchSideEffect.kt index 4934e6e8..84fd3c20 100644 --- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchSideEffect.kt +++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchSideEffect.kt @@ -5,4 +5,5 @@ import com.moneymong.moneymong.common.base.SideEffect sealed interface AgencySearchSideEffect : SideEffect { data class NavigateToRegister(val isUniversityStudent: Boolean) : AgencySearchSideEffect data class NavigateToAgencyJoin(val agencyId: Long) : AgencySearchSideEffect + data object FollowAsk : AgencySearchSideEffect } \ No newline at end of file diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt index c27bcd1e..0f7ff711 100644 --- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt +++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/AgencySearchViewModel.kt @@ -87,4 +87,6 @@ class AgencySearchViewModel @Inject constructor( state.copy(visibleWarningDialog = visible) } } + + fun onClickAskFeedback() = eventEmit(AgencySearchSideEffect.FollowAsk) } \ No newline at end of file diff --git a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/MyMongScreen.kt b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/MyMongScreen.kt index 648fc61b..74d1a373 100644 --- a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/MyMongScreen.kt +++ b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/MyMongScreen.kt @@ -1,5 +1,7 @@ package com.moneymong.moneymong.feature.mymong.main +import android.content.Intent +import android.net.Uri import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer @@ -37,6 +39,7 @@ fun MyMongScreen( navigateToLogin: () -> Unit, ) { val state by viewModel.collectAsState() + val context = LocalContext.current viewModel.collectSideEffect { when (it) { @@ -57,6 +60,8 @@ fun MyMongScreen( } is MyMongSideEffect.FollowKakaoChannel -> { + val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://pf.kakao.com/_zDsyG")) + context.startActivity(intent) } } } diff --git a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongFeedbackView.kt b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongFeedbackView.kt index 8954fffa..79611e96 100644 --- a/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongFeedbackView.kt +++ b/feature/mymong/src/main/java/com/moneymong/moneymong/feature/mymong/main/view/MyMongFeedbackView.kt @@ -17,6 +17,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.moneymong.moneymong.design_system.component.button.MDSButton @@ -48,7 +49,7 @@ fun MyMongFeedbackView( Column { Text( text = "머니몽에게 자유롭게\n문의 해보세요!", - style = Body4, + style = Body4.copy(fontWeight = FontWeight.Bold), color = Gray08 ) Spacer(modifier = Modifier.height(8.dp))