|
|
@@ -491,9 +491,21 @@ class SwapsSellHallUI(
|
|
|
swipeToLayout.finishRefresh()
|
|
|
}
|
|
|
statusLayout.showSuccess()
|
|
|
- businessSellHallAdapter.setNewData(it)
|
|
|
+ businessSellHallAdapter.setNewData( it?.sortedByDescending { it.orderprice })
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ viewModel.quoteDayData.bindOptional(context){
|
|
|
+ val price = it?.getPrice()
|
|
|
+
|
|
|
+ viewModel.businessSellHallDataList.value?.forEach{
|
|
|
+ if(it.pricemode == "3"){
|
|
|
+ it.orderprice = price.toString()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 每笔行情来 要重新排序
|
|
|
+ businessSellHallAdapter.setNewData( viewModel.businessSellHallDataList.value?.sortedByDescending { it.orderprice })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -591,7 +603,7 @@ class SwapsBuyHallUI(
|
|
|
emptyView(hint = resources.getString(R.string.now_no_data))
|
|
|
}).lparams(matchParent, matchParent)
|
|
|
|
|
|
- viewModel.businessBuyHallDataList.bindOptional(context) {
|
|
|
+ viewModel.businessBuyHallDataList.bindOptional(context) { it ->
|
|
|
if (it?.isEmpty() == true || it?.size == 0) {
|
|
|
statusLayout.showEmpty()
|
|
|
} else {
|
|
|
@@ -599,8 +611,20 @@ class SwapsBuyHallUI(
|
|
|
swipeToLayout.finishRefresh()
|
|
|
}
|
|
|
statusLayout.showSuccess()
|
|
|
- businessBuyHallAdapter.setNewData(it)
|
|
|
+ businessBuyHallAdapter.setNewData( it?.sortedBy { it.orderprice })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ viewModel.quoteDayData.bindOptional(context){
|
|
|
+ val price = it?.getPrice()
|
|
|
+
|
|
|
+ viewModel.businessBuyHallDataList.value?.forEach{
|
|
|
+ if(it.pricemode == "3"){
|
|
|
+ it.orderprice = price.toString()
|
|
|
+ }
|
|
|
}
|
|
|
+ // 每笔行情来 要重新排序
|
|
|
+ businessBuyHallAdapter.setNewData( viewModel.businessBuyHallDataList.value?.sortedBy { it.orderprice })
|
|
|
}
|
|
|
}
|
|
|
}
|