|
|
@@ -68,8 +68,8 @@ class HnstMainFragment : BaseFragment<HnstMainViewmodel>() {
|
|
|
|
|
|
override fun onResume() {
|
|
|
super.onResume()
|
|
|
- viewModel.getUserAccount()
|
|
|
- viewModel.resetAccountData()
|
|
|
+
|
|
|
+// viewModel.resetAccountData()
|
|
|
viewModel.queryContractTradePosition("2")
|
|
|
}
|
|
|
|
|
|
@@ -104,7 +104,7 @@ class HnstMainFragment : BaseFragment<HnstMainViewmodel>() {
|
|
|
viewModel.getUserAccount()
|
|
|
// resolve bug #3429
|
|
|
// 减少频率
|
|
|
- if(TimeUtils.getNowMills() - requestTime > 3500){
|
|
|
+ if(TimeUtils.getNowMills() - requestTime > 1000){
|
|
|
viewModel.resetAccountData()
|
|
|
requestTime = TimeUtils.getNowMills()
|
|
|
}
|
|
|
@@ -742,10 +742,13 @@ class HnstMainFragment : BaseFragment<HnstMainViewmodel>() {
|
|
|
*/
|
|
|
viewModel.usedAccountData.bindOptional(context) {
|
|
|
if (isOpenEye.value == true) {
|
|
|
- text = NumberUtils.roundNum(
|
|
|
- NumberUtils.doubleDistortion(it?.valueOfposition_keep_watch_profit_and_loss?.toString()),
|
|
|
- 2
|
|
|
- )
|
|
|
+// if (it!!.valueOfposition_keep_watch_profit_and_loss!! != 0.0){
|
|
|
+ text = NumberUtils.roundNum(
|
|
|
+ NumberUtils.doubleDistortion(it?.valueOfposition_keep_watch_profit_and_loss?.toString()),
|
|
|
+ 2
|
|
|
+ )
|
|
|
+// }
|
|
|
+
|
|
|
textColorInt = when {
|
|
|
it?.valueOfposition_keep_watch_profit_and_loss ?: 0.0 > 0.0 -> {
|
|
|
R.color.rma_red_color
|