Fix ability to click login twice
This commit is contained in:
@@ -75,12 +75,14 @@ class AuthenticationFragment : Fragment() {
|
|||||||
"URL is empty"
|
"URL is empty"
|
||||||
} ?: return
|
} ?: return
|
||||||
}
|
}
|
||||||
|
binding.button.isClickable = false
|
||||||
viewLifecycleOwner.lifecycleScope.launchWhenResumed {
|
viewLifecycleOwner.lifecycleScope.launchWhenResumed {
|
||||||
runCatching {
|
runCatching {
|
||||||
viewModel.authenticate(email, pass, url)
|
viewModel.authenticate(email, pass, url)
|
||||||
}.onFailure {
|
}.onFailure {
|
||||||
Timber.e(it, "Can't authenticate")
|
Timber.e(it, "Can't authenticate")
|
||||||
}
|
}
|
||||||
|
binding.button.isClickable = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user