|
@@ -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()
|
|
|
}
|
|
|
}
|