Updated on 2026-08-14
This commit is contained in:
parent
a4be09ae1e
commit
f5d7d2af45
1 changed files with 26 additions and 11 deletions
|
|
@ -261,19 +261,34 @@ class SendStateSubscriber(fragment: BaseStoreFragment) : FragmentStateSubscriber
|
|||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
private fun handleFeeState(fg: SendFragment, state: FeeState) = with(fg.binding.clNetworkFee) {
|
||||
fg.view?.findViewById<ViewGroup>(R.id.clNetworkFee)?.show(state.mainLayoutIsVisible)
|
||||
flExpandCollapse.imvExpandCollapse.rotation = if (state.controlsLayoutIsVisible) 0f else 180f
|
||||
llFeeControlsContainer.show(state.controlsLayoutIsVisible)
|
||||
chipGroup.show(state.feeChipGroupIsVisible)
|
||||
private fun handleFeeState(fg: SendFragment, state: FeeState) {
|
||||
with(fg.binding.clNetworkFee) {
|
||||
fg.view?.findViewById<ViewGroup>(R.id.clNetworkFee)?.show(state.mainLayoutIsVisible)
|
||||
flExpandCollapse.imvExpandCollapse.rotation = if (state.controlsLayoutIsVisible) 0f else 180f
|
||||
llFeeControlsContainer.show(state.controlsLayoutIsVisible)
|
||||
chipGroup.show(state.feeChipGroupIsVisible)
|
||||
|
||||
swIncludeFee.isEnabled = state.includeFeeSwitcherIsEnabled
|
||||
if (swIncludeFee.isChecked != state.feeIsIncluded) {
|
||||
swIncludeFee.isChecked = state.feeIsIncluded
|
||||
swIncludeFee.isEnabled = state.includeFeeSwitcherIsEnabled
|
||||
if (swIncludeFee.isChecked != state.feeIsIncluded) {
|
||||
swIncludeFee.isChecked = state.feeIsIncluded
|
||||
}
|
||||
|
||||
val chipId = FeeUiHelper.toId(state.selectedFeeType)
|
||||
if (chipGroup.checkedChipId != chipId && chipId != View.NO_ID) chipGroup.check(chipId)
|
||||
}
|
||||
with(fg.binding.clReceiptContainer) {
|
||||
when (state.progressState) {
|
||||
ProgressState.Loading -> {
|
||||
tvReceiptFeeValue.hide()
|
||||
pbReceiptFee.show()
|
||||
}
|
||||
ProgressState.Done -> {
|
||||
pbReceiptFee.hide()
|
||||
tvReceiptFeeValue.show()
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
val chipId = FeeUiHelper.toId(state.selectedFeeType)
|
||||
if (chipGroup.checkedChipId != chipId && chipId != View.NO_ID) chipGroup.check(chipId)
|
||||
}
|
||||
|
||||
@Suppress("LongMethod", "ComplexMethod")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue