Fix IllegalStateException when inflating menu

This commit is contained in:
Kirill Kamakin
2022-04-04 18:52:19 +05:00
parent 0a120bb291
commit e6dbff4a67
2 changed files with 5 additions and 7 deletions

View File

@@ -19,8 +19,6 @@ class AuthenticationViewModel @Inject constructor(
flow = authRepo.isAuthorizedFlow,
transform = AuthenticationState::determineState
).asLiveData()
val currentAuthenticationState: AuthenticationState
get() = checkNotNull(authenticationState.value) { "Auth state flow mustn't be null" }
fun authenticate(username: String, password: String): LiveData<Result<Unit>> {
Timber.v("authenticate() called with: username = $username, password = $password")