Updated on 2026-08-14
This commit is contained in:
parent
44343a08a0
commit
7ad1d1cecf
2 changed files with 13 additions and 4 deletions
|
|
@ -36,6 +36,8 @@ import com.tangem.tap.features.tokens.impl.presentation.states.TokenItemState
|
|||
import com.tangem.tap.features.tokens.impl.presentation.states.TokensListStateHolder
|
||||
import com.tangem.tap.features.tokens.impl.presentation.states.TokensListToolbarState
|
||||
import com.tangem.wallet.R
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.flow.emptyFlow
|
||||
import kotlinx.coroutines.flow.flowOf
|
||||
|
||||
|
|
@ -114,12 +116,9 @@ private fun TokensListContent(
|
|||
) {
|
||||
val state = rememberLazyListState()
|
||||
|
||||
if (state.isScrollInProgress) {
|
||||
LocalSoftwareKeyboardController.current?.hide()
|
||||
}
|
||||
|
||||
LazyColumn(
|
||||
modifier = Modifier
|
||||
.imePadding()
|
||||
.fillMaxSize()
|
||||
.padding(scaffoldPadding),
|
||||
state = state,
|
||||
|
|
@ -139,6 +138,13 @@ private fun TokensListContent(
|
|||
TokenItem(model = it)
|
||||
}
|
||||
}
|
||||
|
||||
val keyboardController = LocalSoftwareKeyboardController.current
|
||||
LaunchedEffect(key1 = state) {
|
||||
snapshotFlow(state::isScrollInProgress)
|
||||
.distinctUntilChanged()
|
||||
.collectLatest { if (it) keyboardController?.hide() }
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.tangem.feature.wallet.presentation.wallet.domain
|
|||
import androidx.annotation.DrawableRes
|
||||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.domain.common.util.cardTypesResolver
|
||||
import com.tangem.domain.demo.DemoConfig
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.feature.wallet.impl.R
|
||||
|
||||
|
|
@ -42,6 +43,8 @@ internal object WalletImageResolver {
|
|||
@DrawableRes twoBackupResId: Int = R.drawable.ill_wallet2_cards3_120_106,
|
||||
): Int? {
|
||||
return resolveWalletWithBackups { count ->
|
||||
if (DemoConfig().isDemoCardId(cardId)) return@resolveWalletWithBackups oneBackupResId
|
||||
|
||||
when (count) {
|
||||
WALLET_WITH_ONE_BACKUP_COUNT -> oneBackupResId
|
||||
WALLET_WITH_TWO_BACKUPS_COUNT -> twoBackupResId
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue