Auto-Commit: 2026-08-18 16:51:13
This commit is contained in:
1 parent
86e789be54
commit
cfb7572c11
3 files changed
+16
-19
No files matched your search
@@ -3,7 +3,7 @@
|
||||
"newArchEnabled": true,
|
||||
"name": "Schnappix",
|
||||
"slug": "Schnappix",
|
||||
"version": "23.01.25",
|
||||
"version": "23.01.26",
|
||||
"orientation": "landscape",
|
||||
"icon": "./Icon.png",
|
||||
"userInterfaceStyle": "dark",
|
||||
@@ -13,7 +13,7 @@
|
||||
},
|
||||
"android": {
|
||||
"package": "de.orfel.schnappix",
|
||||
"versionCode": 25,
|
||||
"versionCode": 26,
|
||||
"usesCleartextTraffic": true,
|
||||
"adaptiveIcon": {
|
||||
"backgroundColor": "#050510",
|
||||
@@ -58,7 +58,15 @@
|
||||
"./plugins/withUsbCamera",
|
||||
"./plugins/withLocalAars",
|
||||
"./plugins/withRemoveMediaPermissions",
|
||||
"./withAndroidSigning"
|
||||
"./withAndroidSigning",
|
||||
[
|
||||
"expo-build-properties",
|
||||
{
|
||||
"android": {
|
||||
"usesCleartextTraffic": true
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"extra": {
|
||||
"eas": {
|
||||
|
||||
@@ -366,7 +366,7 @@ export default function CameraScreen({
|
||||
await saveToGallery(capturedUri, 'Raw', eventText);
|
||||
logger.log('Auto-saved high-res raw capture to gallery');
|
||||
} catch (e: any) {
|
||||
logger.error(`Failed to auto-save raw capture: ${e?.message || e}`);
|
||||
logger.error(`Failed to auto-save raw capture`, e);
|
||||
}
|
||||
|
||||
// Downscale for the UI to prevent OutOfMemoryError in React Native Image
|
||||
|
||||
+4
-15
@@ -53,25 +53,14 @@ export async function saveToGallery(localUri: string, type: 'Raw' | 'Collage', e
|
||||
const newFileName = `${safeEventName}_${timestamp}_${type}.${fileExtension}`;
|
||||
const newLocalUri = `${FileSystem.cacheDirectory}${newFileName}`;
|
||||
|
||||
logger.log(`Types: copyAsync=${typeof FileSystem.copyAsync}, createAsset=${typeof createAssetAsync}, getAlbum=${typeof getAlbumAsync}, createAlbum=${typeof createAlbumAsync}, addAssets=${typeof addAssetsToAlbumAsync}`);
|
||||
|
||||
try {
|
||||
// Copy the file to the new location to force the filename
|
||||
await FileSystem.copyAsync({
|
||||
from: localUri,
|
||||
to: newLocalUri,
|
||||
});
|
||||
} catch (e: any) {
|
||||
logger.error(`Error in copyAsync: ${e.message}`);
|
||||
throw e;
|
||||
}
|
||||
logger.log(`Types: createAsset=${typeof createAssetAsync}, getAlbum=${typeof getAlbumAsync}, createAlbum=${typeof createAlbumAsync}, addAssets=${typeof addAssetsToAlbumAsync}`);
|
||||
|
||||
let asset;
|
||||
try {
|
||||
// 1. Create a media asset from the renamed file
|
||||
asset = await createAssetAsync(newLocalUri);
|
||||
// 1. Create a media asset directly from the local uri
|
||||
asset = await createAssetAsync(localUri);
|
||||
} catch (e: any) {
|
||||
logger.error(`Error in createAssetAsync: ${e.message}`);
|
||||
logger.error(`Error in createAssetAsync: ${e.message}`, e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user