minor fixes

This commit is contained in:
Adam Velebil 2024-09-10 14:25:10 +02:00
parent 5441c95b7e
commit 58167e682b
No known key found for this signature in database
GPG Key ID: C9B1E4A3CBBD2E10

View File

@ -277,7 +277,6 @@ class OathManager(
addToAny = false
requestHandled = false
action.invoke(Result.success(session))
requestHandled = true
} else {
// Awaiting an action for a different device? Fail it and stop processing.
action.invoke(Result.failure(IllegalStateException("Wrong deviceId")))
@ -426,8 +425,7 @@ class OathManager(
oathViewModel.updateCredentials(calculateOathCodes(it))
} catch (e: Exception) {
// after unlocking there was problem getting the codes
// to avoid incomplete session, just reset it so that the user has to
// unlock it again
// to avoid inconsistent UI, clear the session
oathViewModel.clearSession()
throw e
}