Skip to content

Commit

Permalink
fix(ios): format new code;
Browse files Browse the repository at this point in the history
  • Loading branch information
mat1th committed Feb 21, 2024
1 parent cd869bc commit 8610430
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/App/QRCodeScanner/Camera/BarcodeScannerCamera.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class BarcodeScannerCamera: NSObject {

private var captureDevice: AVCaptureDevice? {
didSet {
guard let captureDevice = captureDevice else { return }
guard let captureDevice else { return }
Current.Log.info("Using capture device: \(captureDevice.localizedName)")
sessionQueue.async {
self.updateSessionForCaptureDevice(captureDevice)
Expand Down Expand Up @@ -79,7 +79,7 @@ class BarcodeScannerCamera: NSObject {
}

guard
let captureDevice = captureDevice,
let captureDevice,
let deviceInput = try? AVCaptureDeviceInput(device: captureDevice) else {
Current.Log.error("Failed to obtain video input.")
return
Expand Down Expand Up @@ -199,14 +199,14 @@ class BarcodeScannerCamera: NSObject {
if isCaptureSessionConfigured {
if !captureSession.isRunning {
sessionQueue.async { [self] in
self.captureSession.startRunning()
captureSession.startRunning()
}
}
return
}

sessionQueue.async { [self] in
self.configureCaptureSession { success in
configureCaptureSession { success in
guard success else { return }
self.captureSession.startRunning()
}
Expand Down

0 comments on commit 8610430

Please sign in to comment.