Fix syntax and type errors causing app crash
This commit is contained in:
@@ -125,7 +125,7 @@ export default function DraggableSticker({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<GestureDetector gesture={gesture}>
|
<GestureDetector gesture={gesture}>
|
||||||
<Animated.View style={[styles.stickerWrapper, animatedStyle]}>
|
<Animated.View style={[styles.stickerContainer, animatedStyle]}>
|
||||||
{isText ? (
|
{isText ? (
|
||||||
<View style={styles.textStickerBox}>
|
<View style={styles.textStickerBox}>
|
||||||
<Text style={styles.textStickerContent}>{sticker.content}</Text>
|
<Text style={styles.textStickerContent}>{sticker.content}</Text>
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ export default function CameraScreen({
|
|||||||
return { size: s, pixels: 0, w: 0, h: 0 };
|
return { size: s, pixels: 0, w: 0, h: 0 };
|
||||||
}).filter((s: { pixels: number }) => s.pixels > 0);
|
}).filter((s: { pixels: number }) => s.pixels > 0);
|
||||||
|
|
||||||
parsedSizes.sort((a, b) => a.pixels - b.pixels);
|
parsedSizes.sort((a: any, b: any) => a.pixels - b.pixels);
|
||||||
// Find the LARGEST size available to satisfy user request for original size
|
// Find the LARGEST size available to satisfy user request for original size
|
||||||
const optimal = parsedSizes[parsedSizes.length - 1];
|
const optimal = parsedSizes[parsedSizes.length - 1];
|
||||||
|
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ export default function PreviewScreen({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleExitRef = useRef<() => void>();
|
const handleExitRef = useRef<(() => void) | null>(null);
|
||||||
handleExitRef.current = async () => {
|
handleExitRef.current = async () => {
|
||||||
if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
|
if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
|
||||||
if (!mountedRef.current) return;
|
if (!mountedRef.current) return;
|
||||||
@@ -466,7 +466,6 @@ export default function PreviewScreen({
|
|||||||
ref={viewShotRef}
|
ref={viewShotRef}
|
||||||
options={{ format: 'jpg', quality: 0.95 }}
|
options={{ format: 'jpg', quality: 0.95 }}
|
||||||
style={styles.viewShotContainer}
|
style={styles.viewShotContainer}
|
||||||
collapsable={false}
|
|
||||||
>
|
>
|
||||||
<View style={{ flex: 1, width: '100%', height: '100%' }} collapsable={false}>
|
<View style={{ flex: 1, width: '100%', height: '100%' }} collapsable={false}>
|
||||||
{renderCollageView()}
|
{renderCollageView()}
|
||||||
@@ -579,26 +578,6 @@ export default function PreviewScreen({
|
|||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
<TouchableOpacity
|
|
||||||
style={[styles.editToolBtn, dateOverlay !== 'off' && styles.editToolBtnActive]}
|
|
||||||
onPress={() => {
|
|
||||||
setDateOverlay((prev) => {
|
|
||||||
const nextMode = prev === 'off' ? 'date' : prev === 'date' ? 'datetime' : 'off';
|
|
||||||
logger.log(`Action: Toggled date overlay to ${nextMode}`);
|
|
||||||
return nextMode;
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<FontAwesomeIcon
|
|
||||||
icon={faCalendarDays}
|
|
||||||
size={16}
|
|
||||||
color={dateOverlay !== 'off' ? THEME.colors.text : THEME.colors.accent}
|
|
||||||
/>
|
|
||||||
<Text style={[styles.editToolText, dateOverlay !== 'off' && styles.editToolTextActive]}>
|
|
||||||
Datum
|
|
||||||
</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
|
|
||||||
{frameMode === 'available' && photoUris.length === 1 && (
|
{frameMode === 'available' && photoUris.length === 1 && (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={[styles.editToolBtn, selectedFrameId !== null && styles.editToolBtnActive]}
|
style={[styles.editToolBtn, selectedFrameId !== null && styles.editToolBtnActive]}
|
||||||
|
|||||||
Reference in New Issue
Block a user