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)
|
||||
)
|
||||
|
||||
NavigationItem(
|
||||
title = stringResource(R.string.payment),
|
||||
style = NavigationItemStyle.HomePrimary,
|
||||
navigate = { navController.navigate("payment") },
|
||||
icon = painterResource(R.drawable.dollar_sign)
|
||||
)
|
||||
if(!isPaid) {
|
||||
NavigationItem(
|
||||
title = stringResource(R.string.payment),
|
||||
style = NavigationItemStyle.HomePrimary,
|
||||
navigate = { navController.navigate("payment") },
|
||||
icon = painterResource(R.drawable.dollar_sign)
|
||||
)
|
||||
}
|
||||
|
||||
NavigationItem(
|
||||
title = "Help & Feedback",
|
||||
|
@ -356,6 +356,10 @@ fun PaymentScreen(
|
||||
onExit: () -> Unit = { }
|
||||
) {
|
||||
val isAlreadyPaid = useDataStore(IS_ALREADY_PAID)
|
||||
if(isAlreadyPaid.value) {
|
||||
PaymentThankYouScreen(onExit)
|
||||
return
|
||||
}
|
||||
val pushReminderTime = useDataStore(NOTICE_REMINDER_TIME)
|
||||
val numDaysInstalled = useNumberOfDaysInstalled()
|
||||
val forceShowNotice = useDataStore(FORCE_SHOW_NOTICE)
|
||||
|
Loading…
Reference in New Issue
Block a user