Updated on 2026-08-14
This commit is contained in:
parent
a62354d5fb
commit
131ef0ae71
29 changed files with 218 additions and 132 deletions
|
|
@ -16,7 +16,8 @@ import com.tangem.feature.learn2earn.presentation.ui.state.MainScreenState
|
|||
internal fun Learn2earnDialogs(dialog: MainScreenState.Dialog?) {
|
||||
when (dialog) {
|
||||
is MainScreenState.Dialog.Claimed -> ClaimedDialog(dialog)
|
||||
is MainScreenState.Dialog.PromoCodeNotRegistered -> PromoCodeNotRegisteredDialog(dialog)
|
||||
// TODO: https://tangem.slack.com/archives/C01HARKDLQ0/p1691421861756069
|
||||
// is MainScreenState.Dialog.PromoCodeNotRegistered -> PromoCodeNotRegisteredDialog(dialog)
|
||||
is MainScreenState.Dialog.Error -> ErrorDialog(dialog)
|
||||
else -> Unit
|
||||
}
|
||||
|
|
@ -41,30 +42,30 @@ private fun ClaimedDialog(dialog: MainScreenState.Dialog.Claimed) {
|
|||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun PromoCodeNotRegisteredDialog(dialog: MainScreenState.Dialog.PromoCodeNotRegistered) {
|
||||
AlertDialog(
|
||||
title = {
|
||||
Text(text = stringResource(id = R.string.common_error))
|
||||
},
|
||||
text = {
|
||||
Text(text = stringResource(id = R.string.main_promotion_no_purchase))
|
||||
},
|
||||
dismissButton = {
|
||||
TextButton(
|
||||
text = stringResource(id = R.string.common_cancel),
|
||||
onClick = dialog.onCancel,
|
||||
)
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(
|
||||
text = stringResource(id = R.string.common_buy),
|
||||
onClick = dialog.onOk,
|
||||
)
|
||||
},
|
||||
onDismissRequest = dialog.onDismissRequest,
|
||||
)
|
||||
}
|
||||
// @Composable
|
||||
// private fun PromoCodeNotRegisteredDialog(dialog: MainScreenState.Dialog.PromoCodeNotRegistered) {
|
||||
// AlertDialog(
|
||||
// title = {
|
||||
// Text(text = stringResource(id = R.string.common_error))
|
||||
// },
|
||||
// text = {
|
||||
// Text(text = stringResource(id = R.string.main_promotion_no_purchase))
|
||||
// },
|
||||
// dismissButton = {
|
||||
// TextButton(
|
||||
// text = stringResource(id = R.string.common_cancel),
|
||||
// onClick = dialog.onCancel,
|
||||
// )
|
||||
// },
|
||||
// confirmButton = {
|
||||
// TextButton(
|
||||
// text = stringResource(id = R.string.common_buy),
|
||||
// onClick = dialog.onOk,
|
||||
// )
|
||||
// },
|
||||
// onDismissRequest = dialog.onDismissRequest,
|
||||
// )
|
||||
// }
|
||||
|
||||
@Composable
|
||||
private fun ErrorDialog(dialog: MainScreenState.Dialog.Error) {
|
||||
|
|
|
|||
|
|
@ -5,15 +5,7 @@ import androidx.annotation.StringRes
|
|||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.systemBarsPadding
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.itemsIndexed
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
|
|
@ -62,7 +54,7 @@ fun SwapSelectTokenScreen(
|
|||
ExpandableSearchView(
|
||||
title = stringResource(R.string.swapping_token_list_title),
|
||||
onBackClick = onBack,
|
||||
placeholderSearchText = stringResource(id = R.string.search_tokens_title),
|
||||
placeholderSearchText = stringResource(id = R.string.common_search_tokens),
|
||||
onSearchChange = state.onSearchEntered,
|
||||
onSearchDisplayClose = { state.onSearchEntered("") },
|
||||
onFocusChange = onSearchFocusChange,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue