Browse Source

1.修改切换页面显示底部导航栏bug

王鹏鹏 2 years ago
parent
commit
16452d0c6d

+ 2 - 2
livebroadcast/src/main/java/com/yingyang/livebroadcast/activity/detail/LiveBroadcastDetailViewModel.kt

@@ -18,7 +18,7 @@ class LiveBroadcastDetailViewModel : BaseViewModel() {
         id: String,
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: Record) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         LIVEBROADCAST_API.getLiveDetail(id)
     }.runUI(
         success,
@@ -32,7 +32,7 @@ class LiveBroadcastDetailViewModel : BaseViewModel() {
         id: String,
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: String) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         LIVEBROADCAST_API.getUserSign(id)
     }.runUI(
         success,

+ 1 - 1
livebroadcast/src/main/java/com/yingyang/livebroadcast/activity/list/LiveBroadcastListViewModel.kt

@@ -20,7 +20,7 @@ class LiveBroadcastListViewModel : BaseViewModel() {
         pageStr: Int,
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: LiveBroadcastListBean) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         val requestBean = LiveBroadcastListRequestBodyBean().apply {
             page = pageStr.toString()
             limit = "10"

+ 2 - 2
login/src/main/java/com/yingyang/login/ui/login/LoginViewModel.kt

@@ -17,7 +17,7 @@ class LoginViewModel : BaseViewModel() {
         pwd: String,
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: String) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         val requestBean = LoginRequestBodyBean().apply {
             loginName = name
             passWord = pwd
@@ -32,7 +32,7 @@ class LoginViewModel : BaseViewModel() {
     fun getUserInfo(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: UserInfoBean) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         LOGIN_API.getUserInfo()
     }.runUI(
         success,

+ 1 - 1
personalcenter/src/main/java/com/yingyang/personalcenter/activity/PersonalCenterViewModel.kt

@@ -12,7 +12,7 @@ class PersonalCenterViewModel : BaseViewModel() {
     fun getUserInfo(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: UserInfoBean) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         PERSONALCENTER_API.getUserInfo()
     }.runUI(
         success,

+ 2 - 2
push/src/main/java/com/yingyang/push/activity/PushViewModel.kt

@@ -17,7 +17,7 @@ class PushViewModel : BaseViewModel() {
     fun getSelectByDictType(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: List<PushMessageTypeBean>) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         PUSH_API.getSelectByDictType("warn_type")
     }.runUI(
         success,
@@ -31,7 +31,7 @@ class PushViewModel : BaseViewModel() {
         type: String,
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: List<PushMessageBean>) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         PUSH_API.getPushList(type)
     }.runUI(
         success,

+ 1 - 2
workbenches/src/main/java/com/yingyang/workbenches/WorkbenchesActivity.kt

@@ -125,8 +125,7 @@ class WorkbenchesActivity : BaseMVVMActivity<ActivityWorkbenchesBinding, Workben
     }
 
     override fun initData() {
-//        showTipDialog()
-//        showTaskDialog()
+
     }
 
     /**

+ 4 - 4
workbenches/src/main/java/com/yingyang/workbenches/WorkbenchesViewModel.kt

@@ -31,7 +31,7 @@ class WorkbenchesViewModel : BaseViewModel() {
     fun getCountTrain(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: CountTrainBean) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         WORKBENCHES_API.getCountTrain()
     }.runUI(
         success,
@@ -44,7 +44,7 @@ class WorkbenchesViewModel : BaseViewModel() {
     fun findMyCurrentTask(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: List<MyTaskBean>) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         WORKBENCHES_API.findMyCurrentTask()
     }.runUI(
         success,
@@ -58,7 +58,7 @@ class WorkbenchesViewModel : BaseViewModel() {
         id: String,
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: Record) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         WORKBENCHES_API.getGameDetail(id)
     }.runUI(
         success,
@@ -71,7 +71,7 @@ class WorkbenchesViewModel : BaseViewModel() {
     fun getCountMyMsg(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: String) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         WORKBENCHES_API.getCountMyMsg()
     }.runUI(
         success,

+ 2 - 2
workbenches/src/main/java/com/yingyang/workbenches/freetraining/FreeTrainViewModel.kt

@@ -17,7 +17,7 @@ class FreeTrainViewModel : BaseViewModel() {
     fun getSelectByDictType(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: List<TrainTypeBean>) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         WORKBENCHES_API.getSelectByDictType("game_type")
     }.runUI(
         success,
@@ -31,7 +31,7 @@ class FreeTrainViewModel : BaseViewModel() {
         type: String,
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: List<Record>) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         WORKBENCHES_API.getTrainingList(type)
     }.runUI(
         success,

+ 1 - 1
workbenches/src/main/java/com/yingyang/workbenches/leisurebrain/LeisureBrainViewModel.kt

@@ -16,7 +16,7 @@ class LeisureBrainViewModel : BaseViewModel() {
     fun getSelectByDictType(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: List<TrainTypeBean>) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         WORKBENCHES_API.getSelectByDictType("video_type")
     }.runUI(
         success,

+ 1 - 1
workbenches/src/main/java/com/yingyang/workbenches/orderlist/OrderListViewModel.kt

@@ -16,7 +16,7 @@ class OrderListViewModel : BaseViewModel() {
     fun getOrderList(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: List<TrainTypeBean>) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         WORKBENCHES_API.getSelectByDictType("package_type")
     }.runUI(
         success,

+ 3 - 3
workbenches/src/main/java/com/yingyang/workbenches/servicepackage/ServicePackageViewModel.kt

@@ -21,7 +21,7 @@ class ServicePackageViewModel : BaseViewModel() {
     fun getSelectByDictType(
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: List<TrainTypeBean>) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         WORKBENCHES_API.getSelectByDictType("package_type")
     }.runUI(
         success,
@@ -35,7 +35,7 @@ class ServicePackageViewModel : BaseViewModel() {
         packageType: String,
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: List<PackageInfoBean>) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         WORKBENCHES_API.getServicePackageList(packageType)
     }.runUI(
         success,
@@ -49,7 +49,7 @@ class ServicePackageViewModel : BaseViewModel() {
         bean: GetPayImageEvent,
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: PayImageBean) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         val body = XUtils.createJson(GsonUtil.GsonString(bean))
         WORKBENCHES_API.getPayImage(body)
     }.runUI(

+ 1 - 1
workbenches/src/main/java/com/yingyang/workbenches/traincontentdetails/TrainContentDetailsViewModel.kt

@@ -17,7 +17,7 @@ class TrainContentDetailsViewModel : BaseViewModel() {
         taskId: String,
         fail: ((msg: String) -> Unit)? = null,
         success: ((success: List<TrainContentDetailsBean>) -> Unit)? = null,
-    ) = launchFlow(true) {
+    ) = launchFlow(false) {
         WORKBENCHES_API.getSelectTaskDetailById(taskId)
     }.runUI(
         success,

+ 0 - 2
workbenches/src/main/res/layout/fragment_task.xml

@@ -5,7 +5,6 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@android:color/transparent"
-    android:fitsSystemWindows="true"
     tools:ignore="ResourceName">
 
     <ImageView
@@ -13,7 +12,6 @@
         android:layout_width="@dimen/divider_176px"
         android:layout_height="@dimen/divider_289px"
         android:layout_marginStart="@dimen/divider_67px"
-        android:layout_marginBottom="@dimen/divider_37px"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintLeft_toLeftOf="parent" />