Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not restart camera capture when camera picker is presented #671

Merged
merged 3 commits into from
Sep 14, 2020

Conversation

leonspok
Copy link
Contributor

@leonspok leonspok commented Sep 9, 2020

There is a bug that is mostly noticeable on iOS 14 that introduced camera capture indicator in the status bar.

Steps:

  1. Open photos input
  2. Grant all permissions
  3. Tap on camera preview
  4. Take a photo
  5. Send this photo

Actual result:
There is a green indicator in the status bar

Expected result:
There shouldn't be any indicator

The issue was that when LiveCameraCellPresenter.cameraPickerDidDisappear() is called presenter restarts camera capture. However, at that moment photos input is already hidden and camera preview cell is not visible, so we shouldn't start it.

@leonspok leonspok requested a review from wiruzx September 9, 2020 08:17
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2020

Codecov Report

Merging #671 into master will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #671      +/-   ##
==========================================
- Coverage   18.04%   18.02%   -0.02%     
==========================================
  Files          97       97              
  Lines        5027     5032       +5     
==========================================
  Hits          907      907              
- Misses       4120     4125       +5     
Impacted Files Coverage Δ
.../Input/Photos/Camera/LiveCameraCellPresenter.swift 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ab0d7b...b6f4eca. Read the comment docs.

@leonspok leonspok merged commit accbb60 into master Sep 14, 2020
@leonspok leonspok deleted the photos-input-camera-capture-not-stopped branch September 14, 2020 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants