Add on-device logger

This commit is contained in:
2026-05-31 14:44:48 +02:00
parent b4c5578e8c
commit 2ebb4a6f01
4 changed files with 152 additions and 16 deletions
+8
View File
@@ -23,6 +23,7 @@ import {
import { THEME } from '../styles/theme';
import { printImageLocal } from '../services/printer';
import { saveToGallery } from '../services/storage';
import { logger } from '../services/logger';
import DraggableSticker, { StickerData } from '../components/DraggableSticker';
import StickerTray from '../components/StickerTray';
import FrameOverlay from '../components/FrameOverlay';
@@ -70,6 +71,13 @@ export default function PreviewScreen({
const [selectedStickerId, setSelectedStickerId] = useState<string | null>(null);
const [showStickerTray, setShowStickerTray] = useState<boolean>(false);
React.useEffect(() => {
logger.log(`PreviewScreen mounted with ${photoUris.length} photos. currentPhoto: ${photoUris[photoUris.length - 1]}`);
return () => {
logger.log('PreviewScreen unmounting.');
};
}, [photoUris]);
// Idle Timer state
const idleTimerRef = useRef<any>(null);