prevent reload when re-selecting resolution

This commit is contained in:
darthpaul 2022-09-20 02:19:53 +01:00
parent ea389c5ac9
commit f02d0b3ae7

View File

@ -361,12 +361,12 @@ class CameraXPreview(
isPhotoCapture = isPhotoCapture,
isFrontCamera = isFrontCameraInUse()
) { index, changed ->
mediaSizeStore.storeSize(isPhotoCapture, isFrontCameraInUse(), index)
if (changed) {
currentRecording?.stop()
}
mediaSizeStore.storeSize(isPhotoCapture, isFrontCameraInUse(), index)
startCamera()
}
}
} else {
toggleResolutions(resolutions)
}