Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Fix crashing when biometric unlocking failed
Browse files Browse the repository at this point in the history
  • Loading branch information
M3DZIK committed Mar 2, 2024
1 parent 78554b3 commit a315de3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import dev.medzik.librepass.android.utils.KeyAlias
import dev.medzik.librepass.android.utils.checkIfBiometricAvailable
import dev.medzik.librepass.android.utils.debugLog
import dev.medzik.librepass.android.utils.showBiometricPromptForUnlock
import dev.medzik.librepass.android.utils.showErrorToast
import dev.medzik.librepass.utils.Cryptography.computeAesKey
import dev.medzik.librepass.utils.Cryptography.computePasswordHash
import kotlinx.coroutines.Dispatchers
Expand Down Expand Up @@ -140,6 +141,8 @@ fun UnlockScreen(
} catch (e: Exception) {
e.debugLog()
}
} catch (e: Exception) {
e.showErrorToast(context)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ fun VaultScreen(

LaunchedEffect(scope) {
if (credentials.biometricReSetup) {
reSetupBiometrics()
try {
reSetupBiometrics()
} catch (e: Exception) {
e.showErrorToast(context)
}
}

// get local stored ciphers
Expand Down

0 comments on commit a315de3

Please sign in to comment.