fix: align camera payload caps
This commit is contained in:
@@ -101,6 +101,7 @@ class CameraCaptureManager(private val context: Context) {
|
||||
}
|
||||
|
||||
val maxPayloadBytes = 5 * 1024 * 1024
|
||||
// Base64 inflates payloads by ~4/3; cap encoded bytes so the payload stays under 5MB (API limit).
|
||||
val maxEncodedBytes = (maxPayloadBytes / 4) * 3
|
||||
val result =
|
||||
JpegSizeLimiter.compressToLimit(
|
||||
|
||||
@@ -67,6 +67,7 @@ fun RootScreen(viewModel: MainViewModel) {
|
||||
val cameraFlashToken by viewModel.cameraFlashToken.collectAsState()
|
||||
val activity =
|
||||
remember(cameraHud) {
|
||||
// Status pill owns transient capture state so it doesn't overlap the connection indicator.
|
||||
cameraHud?.let { hud ->
|
||||
when (hud.kind) {
|
||||
CameraHudKind.Photo ->
|
||||
|
||||
Reference in New Issue
Block a user