update: latest source changes

This commit is contained in:
2026-05-31 20:50:37 +02:00
parent 858674c9d4
commit d88187be16
156 changed files with 11885 additions and 4 deletions
+3 -3
View File
@@ -168,7 +168,7 @@ export default function CameraScreen({
const sizes = await expoCameraRef.current.getAvailablePictureSizes();
if (sizes && sizes.length > 0) {
console.log('Available camera sizes:', sizes);
const parsedSizes = sizes.map(s => {
const parsedSizes = sizes.map((s: string) => {
const parts = s.split('x');
if (parts.length === 2) {
const w = parseInt(parts[0], 10);
@@ -176,11 +176,11 @@ export default function CameraScreen({
return { size: s, pixels: w * h, w, h };
}
return { size: s, pixels: 0, w: 0, h: 0 };
}).filter(s => s.pixels > 0);
}).filter((s: { pixels: number }) => s.pixels > 0);
parsedSizes.sort((a, b) => a.pixels - b.pixels);
// Find the smallest size that has at least 1920 width or height (approx 2MP)
const optimal = parsedSizes.find(s => Math.max(s.w, s.h) >= 1920);
const optimal = parsedSizes.find((s: { w: number; h: number }) => Math.max(s.w, s.h) >= 1920);
if (optimal) {
console.log('Setting optimal pictureSize to prevent OOM:', optimal.size);
+1 -1
View File
@@ -1,4 +1,4 @@
import React, { useState, useRef, useCallback } from 'react';
import React, { useState, useRef, useCallback, useEffect } from 'react';
import {
StyleSheet,
Text,