Skip to content

Commit

Permalink
QR Denied Torch Remains Open and Background (#6284)
Browse files Browse the repository at this point in the history
* add fragment support for search engine

* refactor and re indent file

* add test case of fragment usage for search term

* change source of onepassword-app-extension and update

* Update Cartfile

* Update Cartfile.resolved

* Fix UIView.isHidden must be used from main thread only

* Revert "Fix UIView.isHidden must be used from main thread only"

This reverts commit e5ce847.

* FirefoxAccountStateChange post notification wrapped to notify on the main thread.

* fix RustLogins warnings

* migrade deprecated .lproj

* add recommended base localizations

* make background black when camera is denied

* do not allow to open torch when denied camera

Co-authored-by: Garvan Keeley <garvankeeley+github@gmail.com>
  • Loading branch information
Mustafa Hastürk and garvankeeley committed Mar 24, 2020
1 parent 729aa31 commit 3ad94ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Client/Frontend/Browser/QRCodeViewController.swift
Expand Up @@ -12,6 +12,7 @@ private struct QRCodeViewControllerUX {
static let navigationBarTitleColor = UIColor.Photon.White100
static let maskViewBackgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5)
static let isLightingNavigationItemColor = UIColor(red: 0.45, green: 0.67, blue: 0.84, alpha: 1)
static let viewBackgroundDeniedColor = UIColor.black
}

protocol QRCodeViewControllerDelegate {
Expand Down Expand Up @@ -78,6 +79,9 @@ class QRCodeViewController: UIViewController {
if getAuthorizationStatus != .denied {
setupCamera()
} else {
view.backgroundColor = QRCodeViewControllerUX.viewBackgroundDeniedColor
self.navigationItem.rightBarButtonItem?.isEnabled = false

let alert = UIAlertController(title: "", message: Strings.ScanQRCodePermissionErrorMessage, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: Strings.ScanQRCodeErrorOKButton, style: .default, handler: nil))
self.present(alert, animated: true, completion: nil)
Expand Down

0 comments on commit 3ad94ee

Please sign in to comment.