Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ZXing.Net.MAUI/Apple/CameraManager.ios.maccatalyst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public NativePlatformCameraPreviewView CreateNativeView()

public void Connect()
{
UpdateCamera(startIfStopped: true);
UpdateCamera(startIfStopped: false);
view?.StartObservingOrientationChanges();

if (videoDataOutput == null)
Expand Down Expand Up @@ -111,6 +111,8 @@ public void Connect()

public void UpdateCamera()
=> UpdateCamera(startIfStopped: false);
public void UpdateCameraStart()
=> UpdateCamera(startIfStopped: true);

void UpdateCamera(bool startIfStopped)
{
Expand Down
4 changes: 4 additions & 0 deletions ZXing.Net.MAUI/CameraBarcodeReaderViewHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@ public static async void MapVisibility(CameraBarcodeReaderViewHandler handler, I
if (await CameraManager.CheckPermissions())
{
if (handler._isConnected && handler.cameraManager == manager)
#if __IOS__
manager.UpdateCameraStart();
#else
manager.UpdateCamera();
#endif
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions ZXing.Net.MAUI/Net/CameraManager.net.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public void Disconnect()

public void UpdateCamera()
=> LogUnsupported();
public void UpdateCameraStart()
=> LogUnsupported();

public void UpdateTorch(bool on)
=> LogUnsupported();
Expand Down
Loading