소스 검색

1.优化接口获取完数据后才展示占位图页面

王鹏鹏 2 년 전
부모
커밋
10046eb25b
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      home/src/main/java/com/yingyangfly/home/activity/HomeViewModel.kt

+ 2 - 2
home/src/main/java/com/yingyangfly/home/activity/HomeViewModel.kt

@@ -31,7 +31,7 @@ class HomeViewModel : BaseViewModel() {
     fun getCountTrain(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: CountTrainBean) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         HOME_API.getCountTrain()
     }.runUI(
         success,
@@ -57,7 +57,7 @@ class HomeViewModel : BaseViewModel() {
     fun getCountMyMsg(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: String) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         HOME_API.getCountMyMsg()
     }.runUI(
         success,