From 8770efe41b3f5eb7b7d4e3476da9893f482eb9c0 Mon Sep 17 00:00:00 2001 From: Patrick Honkonen Date: Mon, 22 Apr 2024 10:02:53 -0400 Subject: [PATCH] Prompt for camera permission from Add Code button --- .../authenticator/feature/itemlisting/ItemListingScreen.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingScreen.kt b/app/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingScreen.kt index 2b057aee6..0662b63c1 100644 --- a/app/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingScreen.kt +++ b/app/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingScreen.kt @@ -49,7 +49,6 @@ import com.bitwarden.authenticator.ui.platform.base.util.EventsEffect import com.bitwarden.authenticator.ui.platform.base.util.asText import com.bitwarden.authenticator.ui.platform.components.appbar.BitwardenTopAppBar import com.bitwarden.authenticator.ui.platform.components.button.BitwardenFilledTonalButton -import com.bitwarden.authenticator.ui.platform.components.button.BitwardenTextButton import com.bitwarden.authenticator.ui.platform.components.dialog.BasicDialogState import com.bitwarden.authenticator.ui.platform.components.dialog.BitwardenBasicDialog import com.bitwarden.authenticator.ui.platform.components.dialog.BitwardenLoadingDialog @@ -275,7 +274,11 @@ fun ItemListingScreen( ItemListingState.ViewState.Loading, -> { EmptyItemListingContent( - onAddCodeClick = onNavigateToQrCodeScanner, + onAddCodeClick = remember(viewModel) { + { + launcher.launch(Manifest.permission.CAMERA) + } + }, ) } }