Open DuncanMT opened 3 years ago
@Redth Any chances of getting a quick service update out to address this?
Change it to if (err == null)
instead of if (err != null)
.
I've created a pull request for this: https://github.com/Redth/ZXing.Net.Mobile/pull/1028
⤵️ What is the current behaviour?
if (err != null) // Always False {
public void RefreshTorch() { if (IsEnabled) { IsEnabled = false; Enable(true); } }
if (device.LockForConfiguration(out var err)) {
// Inside Setup method WillEnterForegroundObserver = NSNotificationCenter.DefaultCenter.AddObserver( UIApplication.WillEnterForegroundNotification, _ => { if (IsTorchOn) { torch = false; Torch(true); } });
// Inside StopScanning method if (WillEnterForegroundObserver != null) { NSNotificationCenter.DefaultCenter.RemoveObserver(WillEnterForegroundObserver); }