Browse Source

提交人:jtm
提交内容:bug fixed

江天明 1 year ago
parent
commit
a455c2a0ce
1 changed files with 6 additions and 1 deletions
  1. 6 1
      BusinessMain/src/main/java/com/develop/main/ui/RecipesFragment.kt

+ 6 - 1
BusinessMain/src/main/java/com/develop/main/ui/RecipesFragment.kt

@@ -43,6 +43,7 @@ import com.develop.main.viewmodel.HomeViewModel
 import com.drake.brv.BindingAdapter
 import com.drake.brv.utils.*
 import com.drake.net.utils.scopeNet
+import com.pci.basic.util.network.NetUtils
 import kotlinx.coroutines.delay
 import org.greenrobot.eventbus.EventBus
 import org.greenrobot.eventbus.Subscribe
@@ -665,7 +666,11 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
             }
 
             errorCallback.observe(viewLifecycleOwner) {
-                GlobalToast.showToast(getString(com.develop.common.R.string.network_error))
+             if (!NetUtils.isMobileConnected(hostActivity)){
+                 GlobalToast.showToast(getString(com.develop.common.R.string.network_error))
+             } else {
+                 GlobalToast.showToast(it)
+             }
                 loadingDialog.removeSelf()
             }
         }