diff --git a/Icon.png b/Icon-original.png similarity index 100% rename from Icon.png rename to Icon-original.png diff --git a/src/screens/CameraScreen.tsx b/src/screens/CameraScreen.tsx index 337ff715..0392f352 100644 --- a/src/screens/CameraScreen.tsx +++ b/src/screens/CameraScreen.tsx @@ -246,7 +246,9 @@ export default function CameraScreen({ startCountdown(); - return () => {}; + return () => { + if (countdownTimerRef.current) clearTimeout(countdownTimerRef.current); + }; }, [countdownDuration, isIdle, pictureSize, isUsbConnected]); const startCountdown = () => { diff --git a/src/screens/PreviewScreen.tsx b/src/screens/PreviewScreen.tsx index 37f571c2..93408ce5 100644 --- a/src/screens/PreviewScreen.tsx +++ b/src/screens/PreviewScreen.tsx @@ -216,6 +216,7 @@ export default function PreviewScreen({ // Triggers the view capture and the print job const handlePrint = async () => { + if (!mountedRef.current) return; if (isProcessing) return; setIsProcessing(true); setStatusMessage('Dein Foto wird vorbereitet...'); @@ -250,6 +251,7 @@ export default function PreviewScreen({ // Saves to gallery without printing const handleSaveOnly = async () => { + if (!mountedRef.current) return; if (isProcessing) return; setIsProcessing(true); setStatusMessage('Bild wird generiert...'); @@ -277,6 +279,7 @@ export default function PreviewScreen({ // Auto-save and exit const handleExit = useCallback(async () => { + if (!mountedRef.current) return; if (isProcessing) return; const state = stateRef.current; if (state.stickers.length === 0 && state.layout === 'single' && !state.activeFrame && state.dateOverlay === 'off') { @@ -321,6 +324,7 @@ export default function PreviewScreen({ }, [resetIdleTimer]); const handleRetakeClick = async () => { + if (!mountedRef.current) return; if (isProcessing) return; if (stickers.length > 0 || layout !== 'single' || activeFrame || dateOverlay !== 'off') { setIsProcessing(true);