Skip to content

Commit

Permalink
Fix updating MarketFilters on Blockchain select
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelekol committed Jun 11, 2024
1 parent 4f8e61a commit c875cdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class BlockchainsSelectorFragment : BaseComposeFragment() {
this,
object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
viewModel.updateListBySelectedBlockchains()
findNavController().popBackStack()
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,23 +222,18 @@ class MarketFiltersViewModel(val service: MarketFiltersService)
fun anyBlockchains() {
selectedBlockchains = emptyList()
updateSelectedBlockchains()
emitState()
reloadData()
}

fun onBlockchainCheck(blockchain: Blockchain) {
selectedBlockchains += blockchain
updateSelectedBlockchains()
emitState()
reloadData()
}

fun onBlockchainUncheck(blockchain: Blockchain) {
selectedBlockchains -= blockchain
updateSelectedBlockchains()
emitState()
}

fun updateListBySelectedBlockchains() {
emitState()
reloadData()
}

Expand Down

0 comments on commit c875cdc

Please sign in to comment.