Skip to content

Commit

Permalink
Prompt for camera permission from Add Code button
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintPatrck committed Apr 22, 2024
1 parent b3063fe commit 8770efe
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -275,7 +274,11 @@ fun ItemListingScreen(
ItemListingState.ViewState.Loading,
-> {
EmptyItemListingContent(
onAddCodeClick = onNavigateToQrCodeScanner,
onAddCodeClick = remember(viewModel) {
{
launcher.launch(Manifest.permission.CAMERA)
}
},
)
}
}
Expand Down

0 comments on commit 8770efe

Please sign in to comment.