mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
minor fix on threading issue
This commit is contained in:
parent
2e67bc9374
commit
747695c39b
|
@ -115,7 +115,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
self.capture.layer.frame = self.view.bounds;
|
||||
[self.view.layer addSublayer:self.capture.layer];
|
||||
[self.view bringSubviewToFront:self.maskingView];
|
||||
[self.capture start];
|
||||
|
||||
dispatch_async(self.captureQueue, ^{
|
||||
[self.capture start];
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -67,9 +67,7 @@ final class ScanQRCodeWrapperVC : BaseVC {
|
|||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
UIDevice.current.ows_setOrientation(.portrait)
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.scanQRCodeVC.startCapture()
|
||||
}
|
||||
self.scanQRCodeVC.startCapture()
|
||||
}
|
||||
|
||||
// MARK: Interaction
|
||||
|
@ -78,8 +76,6 @@ final class ScanQRCodeWrapperVC : BaseVC {
|
|||
}
|
||||
|
||||
public func startCapture() {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.scanQRCodeVC.startCapture()
|
||||
}
|
||||
self.scanQRCodeVC.startCapture()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue