[BWA-108] Don't Show QR Code Scan Link When Camera Is Unauthorized #219
+52
โ6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
๐๏ธ Tracking
BWA-108
๐ Objective
This PR adds a check for camera authorization when setting the
ManualEntryState.deviceSupportsCamera
. Previously, this was true when the device had a camera even if the user had denied access. Now it will be false if there is no camera present or the user has denied access to the camera (either by initially saying No to the dialog asking for authorization, or if they agreed at first but have since turned it off in Settings).The net-net of this change is that the Manual Entry View will not show the Scan QR code link suggestion at the bottom if the user has denied access to the camera. We already do a check for this when they hit the add code button, and they land silently on the manual entry view if the camera is not present or the access is not authorized. But previously we'd still show a Scan QR code link if the device had a camera (even when it was not authorized) and you could tap that link only to silently return to the Manual Entry View.
We could also take the approach of leaving the link but showing an error dialog when the link is tapped (something along those lines is mentioned in the ticket). I didn't see any designs for that, so I didn't pursue it for now. But it would be easy to pivot to that if we prefer to show a dialog.
๐ธ Screenshots
This screen existed previously (if your device did not have a camera). But it now will look like this if you have a camera but have denied access.
โฐ Reminders before review
๐ฆฎ Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or โน๏ธ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or ๐ญ (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or โป๏ธ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes