Fix final 4 resilience edge cases

This commit is contained in:
2026-06-01 10:54:35 +02:00
parent 40704fa49b
commit 1c223e3cf6
4 changed files with 26 additions and 17 deletions
+2 -1
View File
@@ -81,7 +81,8 @@ export default function App() {
const handleBurstComplete = (uris: string[]) => {
setPhotoUris((prev) => {
const next = [...prev, ...uris];
return next.length > 4 ? next.slice(-4) : next;
const maxKeep = Math.max(4, uris.length);
return next.length > maxKeep ? next.slice(-maxKeep) : next;
});
setCaptureHistory((prev) => [...prev, uris.length]);
setCurrentScreen('preview');