Cut 1.2.3 with a shutter that never waits on GPS

Bound the geotag fix with a 2 s deadline and prewarm it at launch, queue a
shot pressed before the camera session binds and replay it, pass the options
argument capturePhotoToFile requires, save through the native path so the
media permission is not needed, and release the Skia surface and bitmap after
every export. Store the JS bundle uncompressed and load the export pipeline on
demand. Note in RELEASE_NOTES.md that none of this moved the tap threshold.
This commit is contained in:
2026-09-17 10:02:35 +07:00
parent d07dd69f17
commit 76cf4c6d7e
12 changed files with 476 additions and 170 deletions
+7
View File
@@ -29,6 +29,13 @@ async function ensureLocationPermission(): Promise<boolean> {
}
}
// Resolve to null when `p` has not settled inside `ms`. The promise itself is
// untouched — the caller only stops waiting on it. Used by the shutter: an
// indoor fix can take 20s+, and the photo must not wait for it.
export function withDeadline<T>(p: Promise<T>, ms: number): Promise<T | null> {
return Promise.race([p, new Promise<null>((resolve) => setTimeout(() => resolve(null), ms))]);
}
export async function getCurrentGPS(): Promise<GPSInfo | null> {
try {
const hasPermission = await ensureLocationPermission();