afriscic / BarcodeScanning.Native.Maui

Barcode scanning library for .NET MAUI
https://www.nuget.org/packages/BarcodeScanning.Native.Maui
MIT License
183 stars 33 forks source link

RequestZoomFactor DeadLock after 1.5.4 release on Android #75

Closed MartinYanicelli closed 4 months ago

MartinYanicelli commented 4 months ago

After last change for reset RequestZoomFactor value on 1.5.4 release, if you now change the RequestZoomFactor property value we enter a deadlock because the cameramanger UpdateZoomFactor method and the observer onchange method call between them all the time. The workaround for the moment is put additional check on the observer method, something like this:

if (value is not null && _cameraView is not null && value is IZoomState state && _cameraView.CurrentZoomFactor != state.ZoomRatio)

I can't test on iOs because I don't have an iphone but apparently it's not the same case.

Sorry for my english is very poor.

MartinYanicelli commented 4 months ago

By the way, thank you so much for the great job!

afriscic commented 4 months ago

Totally missed it, thank you! Should be fixed in 1.5.5