We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9305885 + 633624a commit 0709007Copy full SHA for 0709007
JetpackMvvm/src/main/java/me/hgj/jetpackmvvm/base/fragment/BaseVmFragment.kt
@@ -126,7 +126,11 @@ abstract class BaseVmFragment<VM : BaseViewModel> : Fragment() {
126
*/
127
private fun registorDefUIChange() {
128
mViewModel.loadingChange.showDialog.observe(viewLifecycleOwner, Observer {
129
- showLoading()
+ showLoading(
130
+ if (it.isEmpty()) {
131
+ "请求网络中..."
132
+ } else it
133
+ )
134
})
135
mViewModel.loadingChange.dismissDialog.observe(viewLifecycleOwner, Observer {
136
dismissLoading()
@@ -150,4 +154,4 @@ abstract class BaseVmFragment<VM : BaseViewModel> : Fragment() {
150
154
}
151
155
152
156
153
-}
157
+}
0 commit comments