mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
fix(camera): full roll no longer discards the newest photo
When the roll hit CAMERA_ROLL_LIMIT the capture path alerted "full" then did clone.pop() (dropping the NEWEST photo) and pushed the new one — so once full the roll was pinned at the limit and every further shot just replaced the most-recent picture. Block the shot instead (return after the alert).
This commit is contained in:
@@ -46,9 +46,11 @@ export const CameraWidgetCaptureView: FC<CameraWidgetCaptureViewProps> = props =
|
||||
|
||||
if(clone.length >= CAMERA_ROLL_LIMIT)
|
||||
{
|
||||
// Roll is full — block the shot (the old code did clone.pop(), which
|
||||
// discarded the NEWEST photo and pinned the roll at the limit forever).
|
||||
simpleAlert(LocalizeText('camera.full.body'));
|
||||
|
||||
clone.pop();
|
||||
return;
|
||||
}
|
||||
|
||||
PlaySound(SoundNames.CAMERA_SHUTTER);
|
||||
|
||||
Reference in New Issue
Block a user