Fix link device crash.

This commit is contained in:
mtang-signal
2024-10-01 13:50:59 -04:00
committed by Greyson Parrelli
parent 4dba584913
commit 9d0aef8dbc
2 changed files with 10 additions and 2 deletions

View File

@@ -135,7 +135,9 @@ class LinkDeviceFragment : ComposeFragment() {
LaunchedEffect(state.seenEducationSheet) {
if (state.seenEducationSheet) {
biometricAuth.authenticate(requireContext(), true) { biometricDeviceLockLauncher.launch(getString(R.string.LinkDeviceFragment__unlock_to_link)) }
if (!biometricAuth.authenticate(requireContext(), true) { biometricDeviceLockLauncher.launch(getString(R.string.LinkDeviceFragment__unlock_to_link)) }) {
navController.safeNavigate(R.id.action_linkDeviceFragment_to_addLinkDeviceFragment)
}
viewModel.markEducationSheetSeen(false)
}
}