fix: async dispatch conditional
This commit is contained in:
parent
ca0c0e92e0
commit
e5fe5ab175
@ -197,8 +197,8 @@ public final class CameraView: UIView {
|
||||
}
|
||||
|
||||
// This is a wack workaround, but if I immediately set torch mode after `startRunning()`, the session isn't quite ready yet and will ignore torch.
|
||||
self.cameraQueue.asyncAfter(deadline: .now() + 0.1) {
|
||||
if shouldUpdateTorch {
|
||||
if shouldUpdateTorch {
|
||||
self.cameraQueue.asyncAfter(deadline: .now() + 0.1) {
|
||||
self.setTorchMode(self.torch)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user