Skip to content

Commit

Permalink
refactor: use named parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgerardojacinto committed Nov 14, 2023
1 parent a521f9c commit 1a9b4fe
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,22 @@ class OSBARCScannerActivity : ComponentActivity() {

if (!permissionGiven) {
CameraPermissionRequiredDialog(
{
onDismissRequest = {
this.setResult(OSBARCError.CAMERA_PERMISSION_DENIED_ERROR.code)
this.finish()
},
{
onConfirmation = {
val intent = Intent().apply {
action = Settings.ACTION_APPLICATION_DETAILS_SETTINGS
data = Uri.fromParts("package", context.packageName, null)
}
context.startActivity(intent)
},
showDialog,
shouldShowDialog = showDialog,
dialogTitle = "Camera Access Not Enabled",
dialogText = "To continue, please go to the Settings app and enable it.",
"Settings",
"Ok"
confirmButtonText = "Settings",
dismissButtonText = "Ok"
)
}

Expand Down

0 comments on commit 1a9b4fe

Please sign in to comment.