mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
chore: rename look up location (#2603)
Renames a function call and fixes a NullPointerException on Android
This commit is contained in:
@@ -2,7 +2,7 @@ export const getPredictionsForImage = jest.fn( () => Promise.resolve( { predicti
|
||||
export const getPredictionsForLocation = jest.fn( () => Promise.resolve( { predictions: [] } ) );
|
||||
export const removeLogListener = jest.fn( );
|
||||
export const resetStoredResults = jest.fn( );
|
||||
export const lookUpLocation = jest.fn( location => ( {
|
||||
export const getCellLocation = jest.fn( location => ( {
|
||||
...location,
|
||||
elevation: 12
|
||||
} ) );
|
||||
|
||||
@@ -1204,7 +1204,7 @@ PODS:
|
||||
- VisionCamera/React (4.0.5):
|
||||
- React-Core
|
||||
- VisionCamera/FrameProcessors
|
||||
- VisionCameraPluginInatVision (4.2.0):
|
||||
- VisionCameraPluginInatVision (4.2.1):
|
||||
- React-Core
|
||||
- Yoga (1.14.0)
|
||||
|
||||
@@ -1610,7 +1610,7 @@ SPEC CHECKSUMS:
|
||||
RNVectorIcons: 102cd20472bf0d7cd15443d43cd87f9c97228ac3
|
||||
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
|
||||
VisionCamera: f02de0b1b6b1516b327bd8215237a97e7386db8a
|
||||
VisionCameraPluginInatVision: fcf3a3da9272def9014735257e065726c2d66d4f
|
||||
VisionCameraPluginInatVision: f2e065009ed10375293fe343834c6d946e884a8a
|
||||
Yoga: c716aea2ee01df6258550c7505fa61b248145ced
|
||||
|
||||
PODFILE CHECKSUM: eff4b75123af5d6680139a78c055b44ad37c269b
|
||||
|
||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -103,7 +103,7 @@
|
||||
"realm": "^12.6.2",
|
||||
"sanitize-html": "^2.13.0",
|
||||
"ts-jest": "^29.1.2",
|
||||
"vision-camera-plugin-inatvision": "github:inaturalist/vision-camera-plugin-inatvision#b905ff2b9ce1cf64797d600c6cd22fc7617b2389",
|
||||
"vision-camera-plugin-inatvision": "github:inaturalist/vision-camera-plugin-inatvision#dcad11b1532cb8b777eaaf78d6df0a704e8c71d3",
|
||||
"zustand": "^4.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -20685,9 +20685,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vision-camera-plugin-inatvision": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "git+ssh://git@github.com/inaturalist/vision-camera-plugin-inatvision.git#b905ff2b9ce1cf64797d600c6cd22fc7617b2389",
|
||||
"integrity": "sha512-8mw2Txnv5zxu2VcsQuEMVfbYP4aoi75XmeqM4Z2SbhFUOsQSnL4GGsTvTlxKPF2mNGJjeC4+NYZRlh6+tVPu9w==",
|
||||
"version": "4.2.1",
|
||||
"resolved": "git+ssh://git@github.com/inaturalist/vision-camera-plugin-inatvision.git#dcad11b1532cb8b777eaaf78d6df0a704e8c71d3",
|
||||
"integrity": "sha512-PRgGpmWL6/XIYAh6xS50YrHxoUQxSlWWzPdDYHzcYBct9gBESCF0NUeFctWeqCJGjDcmL7RKlCYdizivZyiPmQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"h3-js": "^4.1.0"
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
"realm": "^12.6.2",
|
||||
"sanitize-html": "^2.13.0",
|
||||
"ts-jest": "^29.1.2",
|
||||
"vision-camera-plugin-inatvision": "github:inaturalist/vision-camera-plugin-inatvision#b905ff2b9ce1cf64797d600c6cd22fc7617b2389",
|
||||
"vision-camera-plugin-inatvision": "github:inaturalist/vision-camera-plugin-inatvision#dcad11b1532cb8b777eaaf78d6df0a704e8c71d3",
|
||||
"zustand": "^4.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -136,8 +136,8 @@ const FrameProcessorCamera = ( {
|
||||
// unfortunately, I was not able to run this new function in the worklets directly,
|
||||
// so we need to do this here before calling the useFrameProcessor hook.
|
||||
// For predictions from file this function runs in the vision-plugin code directly.
|
||||
const location = hasUserLocation
|
||||
? InatVision.lookUpLocation( userLocation )
|
||||
const geoModelCellLocation = hasUserLocation
|
||||
? InatVision.getCellLocation( userLocation )
|
||||
: null;
|
||||
const frameProcessor = useFrameProcessor(
|
||||
frame => {
|
||||
@@ -173,9 +173,9 @@ const FrameProcessorCamera = ( {
|
||||
useGeomodel: hasUserLocation,
|
||||
geomodelPath,
|
||||
location: {
|
||||
latitude: location?.latitude,
|
||||
longitude: location?.longitude,
|
||||
elevation: location?.altitude
|
||||
latitude: geoModelCellLocation?.latitude,
|
||||
longitude: geoModelCellLocation?.longitude,
|
||||
elevation: geoModelCellLocation?.elevation
|
||||
}
|
||||
} );
|
||||
const timeAfter = Date.now();
|
||||
@@ -198,7 +198,7 @@ const FrameProcessorCamera = ( {
|
||||
lastTimestamp,
|
||||
fps,
|
||||
hasUserLocation,
|
||||
location
|
||||
geoModelCellLocation
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user