Fix ability to click login twice

This commit is contained in:
Kirill Kamakin
2021-11-20 22:59:13 +03:00
parent 5067e1e98f
commit 0a0472c17d

View File

@@ -75,12 +75,14 @@ class AuthenticationFragment : Fragment() {
"URL is empty"
} ?: return
}
binding.button.isClickable = false
viewLifecycleOwner.lifecycleScope.launchWhenResumed {
runCatching {
viewModel.authenticate(email, pass, url)
}.onFailure {
Timber.e(it, "Can't authenticate")
}
binding.button.isClickable = true
}
}