Fix final 4 resilience edge cases
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user