mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Do not show payment screen again if the user has already paid
This commit is contained in:
parent
9ea64e0005
commit
0c4659004a
@ -92,12 +92,14 @@ fun HomeScreen(navController: NavHostController = rememberNavController()) {
|
|||||||
icon = painterResource(id = R.drawable.eye)
|
icon = painterResource(id = R.drawable.eye)
|
||||||
)
|
)
|
||||||
|
|
||||||
NavigationItem(
|
if(!isPaid) {
|
||||||
title = stringResource(R.string.payment),
|
NavigationItem(
|
||||||
style = NavigationItemStyle.HomePrimary,
|
title = stringResource(R.string.payment),
|
||||||
navigate = { navController.navigate("payment") },
|
style = NavigationItemStyle.HomePrimary,
|
||||||
icon = painterResource(R.drawable.dollar_sign)
|
navigate = { navController.navigate("payment") },
|
||||||
)
|
icon = painterResource(R.drawable.dollar_sign)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
NavigationItem(
|
NavigationItem(
|
||||||
title = "Help & Feedback",
|
title = "Help & Feedback",
|
||||||
|
@ -356,6 +356,10 @@ fun PaymentScreen(
|
|||||||
onExit: () -> Unit = { }
|
onExit: () -> Unit = { }
|
||||||
) {
|
) {
|
||||||
val isAlreadyPaid = useDataStore(IS_ALREADY_PAID)
|
val isAlreadyPaid = useDataStore(IS_ALREADY_PAID)
|
||||||
|
if(isAlreadyPaid.value) {
|
||||||
|
PaymentThankYouScreen(onExit)
|
||||||
|
return
|
||||||
|
}
|
||||||
val pushReminderTime = useDataStore(NOTICE_REMINDER_TIME)
|
val pushReminderTime = useDataStore(NOTICE_REMINDER_TIME)
|
||||||
val numDaysInstalled = useNumberOfDaysInstalled()
|
val numDaysInstalled = useNumberOfDaysInstalled()
|
||||||
val forceShowNotice = useDataStore(FORCE_SHOW_NOTICE)
|
val forceShowNotice = useDataStore(FORCE_SHOW_NOTICE)
|
||||||
|
Loading…
Reference in New Issue
Block a user