Fix 8 critical/high resilience issues across camera, preview, logger, settings, and admin
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user