fix: improve zoom stops precision threshold

This commit is contained in:
zhoubinjia committed 2026-05-07 19:38:52 +08:00
1 parent e2cec9e376
commit 3f3092d6fc
1 file changed
+1 -1
@@ -2326,7 +2326,7 @@ class CameraViewModel(application: Application) : AndroidViewModel(application)
if (mainCamera.focalLength35mmEquivalent > 0) {
customFocalLengths.forEach { fl ->
val zoom = fl / mainCamera.focalLength35mmEquivalent
if (stops.none { abs(it - zoom) <= 0.1f }) {
if (stops.none { abs(it - zoom) <= 0.01f }) {
stops.add(zoom)
}
}