Skip to content

Commit

Permalink
fix/QA-51: 개인정보처리방침 웹뷰 상단에 앱바 뒤로가기 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yangsooplus committed Feb 13, 2024
1 parent 81555f7 commit e94624d
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,27 @@ import com.susu.core.designsystem.theme.Gray50
import com.susu.core.designsystem.theme.Gray70
import com.susu.core.designsystem.theme.SusuTheme
import com.susu.core.ui.SUSU_GOOGLE_FROM_URL
import com.susu.core.ui.SnackbarToken
import com.susu.core.ui.SnsProviders
import com.susu.feature.mypage.R

@Composable
fun MyPageSocialRoute(
padding: PaddingValues,
popBackStack: () -> Unit,
onShowSnackbar: (SnackbarToken) -> Unit,
) {
MyPageSocialScreen(padding = padding, popBackStack = popBackStack)
MyPageSocialScreen(
padding = padding,
popBackStack = popBackStack,
onShowSnackbar = onShowSnackbar,
)
}

@Composable
fun MyPageSocialScreen(
padding: PaddingValues = PaddingValues(),
onShowSnackbar: (SnackbarToken) -> Unit = {},
popBackStack: () -> Unit = {},
) {
val context = LocalContext.current
Expand Down Expand Up @@ -89,7 +96,13 @@ fun MyPageSocialScreen(
style = XSmallButtonStyle.height36,
isActive = false,
isClickable = true,
onClick = { context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(SUSU_GOOGLE_FROM_URL))) },
onClick = {
runCatching {
context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(SUSU_GOOGLE_FROM_URL)))
}.onFailure {
onShowSnackbar(SnackbarToken(message = context.getString(R.string.snackbar_browser_not_found)))
}
},
)
}
}
Expand Down

0 comments on commit e94624d

Please sign in to comment.