Fix bugs from code review (state flow, idle timer, logger, kiosk, temp files)
This commit is contained in:
@@ -159,8 +159,18 @@ export default function CameraScreen({
|
||||
}, []);
|
||||
|
||||
// Cancel capture process
|
||||
const handleLocalCancel = () => {
|
||||
const handleLocalCancel = async () => {
|
||||
if (burstTimerRef.current) clearTimeout(burstTimerRef.current);
|
||||
|
||||
// Clean up any temp files from a partially completed burst
|
||||
for (const uri of burstUris) {
|
||||
try {
|
||||
await FileSystem.deleteAsync(uri, { idempotent: true });
|
||||
} catch (e) {
|
||||
console.warn('Failed to delete temp file on cancel:', e);
|
||||
}
|
||||
}
|
||||
|
||||
setCountdown(countdownDuration);
|
||||
setIsCapturing(false);
|
||||
setBurstIndex(0);
|
||||
|
||||
Reference in New Issue
Block a user