chore: Fix app

This commit is contained in:
2026-07-14 00:41:05 +02:00
parent 3e090933fd
commit edc4d935d8
98 changed files with 2878 additions and 155 deletions
@@ -17,12 +17,21 @@ export function shouldPreflightMobileCapturePermissions(runtime: RuntimePlatform
return runtime === 'capacitor';
}
/**
* Only an explicit native denial blocks capture. Any other state (granted, a
* dismissed prompt, or an unknown value) defers to the WebView getUserMedia
* permission flow, which re-prompts through Capacitor's WebChromeClient.
*/
function isCaptureBlockedByNativeDenial(state: MobileMediaPermissionState | undefined): boolean {
return state === 'denied';
}
/** Resolve whether voice capture can proceed after a native permission request. */
export function isVoiceCaptureAllowed(result: MobileCapturePermissionResult): boolean {
return isMobileCapturePermissionGranted(result.microphone);
return !isCaptureBlockedByNativeDenial(result.microphone);
}
/** Resolve whether camera capture can proceed after a native permission request. */
export function isCameraCaptureAllowed(result: MobileCapturePermissionResult): boolean {
return isMobileCapturePermissionGranted(result.camera);
return !isCaptureBlockedByNativeDenial(result.camera);
}