Fix 8 critical/high resilience issues across camera, preview, logger, settings, and admin

This commit is contained in:
2026-06-01 10:14:29 +02:00
parent e069fef170
commit 2ddd74468e
6 changed files with 39 additions and 18 deletions
+5 -1
View File
@@ -217,8 +217,9 @@ export default function PreviewScreen({
}
};
// Triggers the view capture and the print job
// ── Actions ──
const handlePrint = async () => {
if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
if (!mountedRef.current) return;
if (isProcessing) return;
setIsProcessing(true);
@@ -253,6 +254,7 @@ export default function PreviewScreen({
// Saves to gallery without printing
const handleSaveOnly = async () => {
if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
if (!mountedRef.current) return;
if (isProcessing) return;
setIsProcessing(true);
@@ -281,6 +283,7 @@ export default function PreviewScreen({
// Auto-save and exit
const handleExit = useCallback(async () => {
if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
if (!mountedRef.current) return;
if (isProcessing) return;
const state = stateRef.current;
@@ -326,6 +329,7 @@ export default function PreviewScreen({
}, [resetIdleTimer]);
const handleRetakeClick = async () => {
if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
if (!mountedRef.current) return;
if (isProcessing) return;
if (stickers.length > 0 || layout !== 'single' || activeFrame || dateOverlay !== 'off') {