Skip to content

Commit

Permalink
feat : 웹뷰 방침 예매하기에도 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
HamBP committed Sep 4, 2024
1 parent 14f3190 commit 59224cb
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import com.nexters.boolti.presentation.component.BTTextField
import com.nexters.boolti.presentation.component.BtBackAppBar
import com.nexters.boolti.presentation.component.BusinessInformation
import com.nexters.boolti.presentation.component.MainButton
import com.nexters.boolti.presentation.component.PolicyBottomSheet
import com.nexters.boolti.presentation.component.ToastSnackbarHost
import com.nexters.boolti.presentation.extension.filterToPhoneNumber
import com.nexters.boolti.presentation.extension.showDateTimeString
Expand Down Expand Up @@ -110,8 +111,8 @@ fun TicketingScreen(
var showConfirmDialog by remember { mutableStateOf(false) }
var showPaymentFailureDialog by remember { mutableStateOf(false) }
var showTicketSoldOutDialog by remember { mutableStateOf(false) }
var policyPageUrl: String? by remember { mutableStateOf(null) }
val context = LocalContext.current
val uriHandler = LocalUriHandler.current

val paymentLauncher =
rememberLauncherForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
Expand Down Expand Up @@ -244,12 +245,10 @@ fun TicketingScreen(
agreement = uiState.orderAgreement,
onClickTotalAgree = viewModel::toggleAgreement,
onClickShow = {
val url = when (it) {
0 -> "https://boolti.notion.site/00259d85983c4ba8a987a374e2615396?pvs=4"
1 -> "https://boolti.notion.site/3-354880c7d75e424486b7974e5cc8bcad?pvs=4"
else -> return@OrderAgreementSection
when (it) {
0 -> policyPageUrl = "https://boolti.in/site-policy/privacy"
1 -> policyPageUrl = "https://boolti.in/site-policy/consent"
}
uriHandler.openUri(url)
},
)

Expand Down Expand Up @@ -328,6 +327,11 @@ fun TicketingScreen(
onBackClicked()
}
}
policyPageUrl?.let { url ->
PolicyBottomSheet(onDismissRequest = {
policyPageUrl = null
}, url = url)
}
}
}

Expand Down

0 comments on commit 59224cb

Please sign in to comment.