|
|
@@ -606,7 +606,9 @@ class SellListedUI(
|
|
|
|
|
|
textView {
|
|
|
viewModel.maxSellListedingNumber.bindOptional(context) {
|
|
|
- text = it.toString()
|
|
|
+ if(it != null){
|
|
|
+ text = it.toString()
|
|
|
+ }
|
|
|
}
|
|
|
text = "0"
|
|
|
textSizeAuto = 29
|
|
|
@@ -1083,12 +1085,19 @@ class BuyListedUI(
|
|
|
if (value.isNullOrEmpty().not() && value.toString().toDouble() != 0.0) {
|
|
|
|
|
|
val infoc = viewModel.tjmdTodayAccountMarginData.value?.infoc
|
|
|
- viewModel.maxBuyListedingNumber.postValue(
|
|
|
- infoc?.setCanSellNumber(canAmount = viewModel.usedAccountData.value?.canUserAmount ?: 1.0,price = value.toString().toDouble(),agreeunit = viewModel.goodsInfo.value?.agreeunit ?: 1)
|
|
|
+ if (infoc != null) {
|
|
|
+ viewModel.maxBuyListedingNumber.postValue(
|
|
|
+ infoc?.setCanSellNumber(
|
|
|
+ canAmount = viewModel.usedAccountData.value?.canUserAmount
|
|
|
+ ?: 1.0,
|
|
|
+ price = value.toString().toDouble(),
|
|
|
+ agreeunit = viewModel.goodsInfo.value?.agreeunit ?: 1
|
|
|
+ )
|
|
|
// viewModel.usedAccountData.value?.canUserAmount?.div(
|
|
|
// value?.toString()?.toDouble() ?: 1.0
|
|
|
// )?.toInt().toString()
|
|
|
- )
|
|
|
+ )
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
setTextColor(R.color.buy_hall_color)
|
|
|
@@ -1183,7 +1192,9 @@ class BuyListedUI(
|
|
|
|
|
|
textView {
|
|
|
viewModel.maxBuyListedingNumber.bindOptional(context) {
|
|
|
- text = it.toString()
|
|
|
+ if(it != null) {
|
|
|
+ text = it.toString()
|
|
|
+ }
|
|
|
}
|
|
|
text = "0"
|
|
|
textSizeAuto = 29
|