element-hq / element-ios

A glossy Matrix collaboration client for iOS
https://element.io
GNU Affero General Public License v3.0
1.73k stars 492 forks source link

Fix a bug where QR codes aren't detected if the camera is too close. #7762

Closed pixlwave closed 7 months ago

pixlwave commented 7 months ago

There were reports about not being able to scan QR codes to verify a device, but it turns out that it does work, just not if you fill the entire frame with the code. Moving back a bit so the code is smaller does work.

My conclusion was that the applyRectOfInterest method isn't really necessary as we don't do that when logging in with a QR code. The removal of that method has no effect on the UI, it simply constrained the area of the capture that ZXing was looking in.

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 12.39%. Comparing base (b39923f) to head (7506fee).

Files Patch % Lines
Riot/Modules/QRCode/Reader/QRCodeReaderView.swift 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #7762 +/- ## ======================================== Coverage 12.38% 12.39% ======================================== Files 1650 1650 Lines 163910 163864 -46 Branches 66401 66392 -9 ======================================== + Hits 20308 20314 +6 + Misses 142934 142882 -52 Partials 668 668 ``` | [Flag](https://app.codecov.io/gh/element-hq/element-ios/pull/7762/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=element-hq) | Coverage Δ | | |---|---|---| | [uitests](https://app.codecov.io/gh/element-hq/element-ios/pull/7762/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=element-hq) | `55.05% <ø> (+<0.01%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/element-hq/element-ios/pull/7762/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=element-hq) | `6.22% <0.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=element-hq#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.