diff --git a/common/src/androidMain/kotlin/com/artemchep/keyguard/feature/qr/ScanQrScreen.kt b/common/src/androidMain/kotlin/com/artemchep/keyguard/feature/qr/ScanQrScreen.kt
index 4aa7cee9..88389870 100644
--- a/common/src/androidMain/kotlin/com/artemchep/keyguard/feature/qr/ScanQrScreen.kt
+++ b/common/src/androidMain/kotlin/com/artemchep/keyguard/feature/qr/ScanQrScreen.kt
@@ -112,24 +112,18 @@ private fun ScanQrCamera2(
modifier = Modifier
.padding(horizontal = Dimens.horizontalPadding),
) {
- val textToShow = if (status.shouldShowRationale) {
- // If the user has denied the permission but the rationale can be shown,
- // then gently explain why the app requires this permission
- "The camera is important for this app. Please grant the permission."
- } else {
- // If it's the first time the user lands on this feature, or the user
- // doesn't want to be asked again for this permission, explain that the
- // permission is required
- "Camera permission required for this feature to be available. " +
- "Please grant the permission"
- }
+ val textToShow = stringResource(Res.string.scanqr_camera_permission_required_text)
Text(textToShow)
Button(
+ modifier = Modifier
+ .padding(top = Dimens.verticalPadding),
onClick = {
cameraPermissionState.launchPermissionRequest()
},
) {
- Text("Request permission")
+ Text(
+ text = stringResource(Res.string.grant_permission),
+ )
}
}
}
diff --git a/common/src/commonMain/composeResources/values/strings.xml b/common/src/commonMain/composeResources/values/strings.xml
index 8373d262..634636ba 100644
--- a/common/src/commonMain/composeResources/values/strings.xml
+++ b/common/src/commonMain/composeResources/values/strings.xml
@@ -175,6 +175,7 @@
Passkey available
Two-factor authentication available
Custom
+ Grant permission
Create account
Follow system settings
@@ -494,6 +495,7 @@
Scan QR code
Load and parse a QR code from an image file.
+ Camera permission is required to scan the QR codes.
Barcode