Skip to content

Commit

Permalink
Merge pull request #41 from Doracoin/patch-1
Browse files Browse the repository at this point in the history
Update BaseVmFragment.kt
  • Loading branch information
hegaojian authored Nov 2, 2020
2 parents 9305885 + 633624a commit 0709007
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 0709007

Please sign in to comment.