Properly prevent fix env dialog from constantly showing

ViewModel has been reconstructed when switching fragment so we lost previous state.
This commit is contained in:
canyie 2022-01-20 17:31:36 +08:00 committed by John Wu
parent b0fba6ce5b
commit 5f4cd50cc4

View File

@ -80,7 +80,9 @@ class HomeViewModel(
it.bindExtra(BR.viewModel, this)
}
private var checkedEnv = false
companion object {
private var checkedEnv = false
}
override fun refresh() = viewModelScope.launch {
state = State.LOADING