[MS-1484] MFID: QR codes are no longer required to be confirmed. QR code readouts cannot be edited.#1723
Conversation
…ode readouts cannot be edited.
There was a problem hiding this comment.
Pull request overview
This PR updates the MFID external-credential search UI/state so that QR-code readouts no longer require user confirmation and cannot be edited, while keeping the existing “confirm/edit” behavior for OCR-derived credentials (e.g., Ghana NHIS / Ghana ID).
Changes:
- Added state flags to indicate whether user confirmation and manual edit are available based on
ExternalCredentialType. - Hid the confirmation checkbox and edit icon in the search UI when those actions aren’t applicable (notably for QR codes).
- Allowed “Continue” without confirmation when confirmation is not required.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| feature/external-credential/src/main/java/com/simprints/feature/externalcredential/screens/search/model/SearchCredentialState.kt | Adds per-credential-type flags controlling whether confirmation/editing should be available. |
| feature/external-credential/src/main/java/com/simprints/feature/externalcredential/screens/search/ExternalCredentialSearchFragment.kt | Uses the new flags to hide the checkbox/edit icon and to relax the confirm-button enablement logic for QR flows. |
| ): SearchCredentialState { | ||
| // [MS-1484] Editing and confirming the readout value should only be available for the OCR readouts (i.e.: Ghana NHIS card) | ||
| // QR codes are not readable by humans, hence there is no point of asking the user to confirm the readout, nor to edit the readout | ||
| val isOcrReadout = when (scannedCredentialResult.credentialType) { |
There was a problem hiding this comment.
Will there be any other non-OCR options? Maybe it would be simpler to just do val isOcrReadout = scannedCredentialResult.credentialType != ExternalCredentialType.QRCode?
There was a problem hiding this comment.
No other non-OCR options are considered in the foreseeable future as far as I can tell. I wanted to keep the explicit when for this specific case: if we agree to add a new credential type, we can refine the logic further, and not skip this condition.
There was a problem hiding this comment.
What would be the benefit of that? To me it feels like simply adding more work in the future.
There was a problem hiding this comment.
- The explicit
whenmakes sure we won't miss this case. - If we stick to
val isOcrReadout = credentialType != ExternalCredentialType.QRCode, then, if non-OCR type is added, it is easy to miss this case since it is not explicit
Thus, I'd advise to sticking to the when option
|



JIRA ticket
Will be released in: 2026.2.1
Notable changes
The OCR readouts still have the 'edit' icon and the 'confirmation checkbox' in place

Testing guidance
Additional work checklist