Updated on 2026-08-14
This commit is contained in:
parent
df1c81ae0c
commit
711391aeda
4 changed files with 12 additions and 5 deletions
|
|
@ -21,6 +21,9 @@ sealed class TokensAction : Action {
|
|||
object Failure : TokensAction()
|
||||
}
|
||||
|
||||
data class LoadMore(val scanResponse: ScanResponse? = null
|
||||
) : TokensAction()
|
||||
|
||||
data class SetAddedCurrencies(
|
||||
val wallets: List<WalletData>, val derivationStyle: DerivationStyle?
|
||||
) : TokensAction()
|
||||
|
|
|
|||
|
|
@ -53,7 +53,13 @@ class TokensMiddleware {
|
|||
action.searchInput
|
||||
)
|
||||
}
|
||||
|
||||
is TokensAction.LoadMore -> {
|
||||
if (store.state.tokensState.needToLoadMore
|
||||
&& store.state.tokensState.currencies.isNotEmpty()
|
||||
) {
|
||||
handleLoadCurrencies(action.scanResponse)
|
||||
}
|
||||
}
|
||||
}
|
||||
next(action)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,13 +84,11 @@ class AddTokensFragment : Fragment(R.layout.fragment_add_tokens),
|
|||
}
|
||||
|
||||
val onLoadMore = {
|
||||
if (store.state.tokensState.needToLoadMore) {
|
||||
store.dispatch(
|
||||
TokensAction.LoadCurrencies(
|
||||
TokensAction.LoadMore(
|
||||
scanResponse = store.state.globalState.scanResponse
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
cvCurrencies.setContent {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue