Skip to content

Commit

Permalink
Update BaseVmFragment.kt
Browse files Browse the repository at this point in the history
Fixed a tip message
  • Loading branch information
Doracoin authored Nov 1, 2020
1 parent 9305885 commit 633624a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ abstract class BaseVmFragment<VM : BaseViewModel> : Fragment() {
*/
private fun registorDefUIChange() {
mViewModel.loadingChange.showDialog.observe(viewLifecycleOwner, Observer {
showLoading()
showLoading(
if (it.isEmpty()) {
"请求网络中..."
} else it
)
})
mViewModel.loadingChange.dismissDialog.observe(viewLifecycleOwner, Observer {
dismissLoading()
Expand All @@ -150,4 +154,4 @@ abstract class BaseVmFragment<VM : BaseViewModel> : Fragment() {
}
}

}
}

0 comments on commit 633624a

Please sign in to comment.