* Create new component for deferred startup tasks
* Function wrapper to defer a task with requestIdleCallback
* Split cache clearing into separate callbacks
So that we can interleave user interactions, I believe.
* We have no await anymore
Also add cancel by id to effect cleanup
* Move over getStorageMetrics
* Add optional timeout param
* Change order of tasks
* Add timeout to diagnostics
* Move findAndLogSentinelFiles over
* Move checkForPreviousCrash over
* Sorry, this does not belong to this PR
But since I am here already it is just a removal without consequences.
* Add TODO
* Do not return anything from findAndLogSentinelFiles
* Rename function
* Update react-native-fs.ts
We were treating every "app start" during testing as having had some sentinel files present from a previous session, i.e. having had an error during a previous camera usage session. Changing to not having sentinelFiles present seems a more sensible default for testing to me.
* Oh, git, why?
* Refactor component to hook
* Reapply "Update react-native-sensitive-info to 5.6.2 (#3346)"
This reverts commit 4bd596074c.
* Explicitly set keychainService to "app" for all calls to RNSInfo
So, apparently the default string used to save sensitive items changed from "app" to "default" between versions 6.0.0-alpha.9 and 5.6.2.
So if we install an app update built with 5.6.2 on top of our previous version (using 6.0.0-alpha.9) we can no longer find our previously stored secrets.
I am leaving the key as overridable by actual options propped in, in case someone wants to build a separate slice at one point. In contrast to accessControl which probably should not be a decision in engineerings court.
* Add comment
* Update test helpers
* Update react-native-sensitive-info
* Delete react-native-sensitive-info+6.0.0-alpha.9.patch
* Migrate sensitive info error handling
* Lint rules changes
* Add comment
* Remove incomplete type
* Add hasItem mock
* Update type
* Remove exported function getUsername
This is nowhere imported, used only in AuthenticationService. Have added the only function that makes use of getSensitiveItem( "username" ) = isCurrentUser to the Auth integration test instead.
* Update package-lock.json
* Update Podfile.lock
* Replace string with exported error code
* Add try catch to hasItem call
* Don't require TS extensions in imports
* Resolve all import extension errors
* Remove file extension from import paths used in mocks
* Remove .d of type definition file paths
* Remove .d of type definition file and import as type
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Start screen in a loading state for 700ms
One idea I have about the bug is that maybe it takes a few renders to initialize the device. As we are immediately backing out of the screen in case we have no device, maybe just adding a few ms to give the native side time helps.
* If no device is selected log the length of devices available
* Add missing mock
* Use unrestricted commonAncestorRankType for offline predictions from file
* The plugin provides an interface for this
* Fix type error
* Add missing type
* The iconic taxon is no longer part of the predictions result
If we use common ancestor rollup mode the ancestor taxa are no longer included in the result (which in turn are the top 10 species predictions). So, we have to get the iconic taxon name for each result in a different manner.
* Not needed as results are returned with highest score first
* Remove number wrapper
* Update comment
* There is no special offline not-confident criterion
This now returns common ancestor as top ID in case there is none over the threshold. So, same as online.
* No distinction between debug types
* Update ModelPrediction.js
* This is actually redundant
* Offline suggestions need to be sorted same as online
* Should not have removed the export
* Update comments
* Update vision-plugin
* useOfflineSuggestion TS
* Use location for prediction from file
* Remove log
* Use plugin function to lookup location and elevation based on h3 cells
* taxonomyRollupCutoff is now done in the plugin on basis of the tops score for a frame
* Fix wrong commit reference. Now references main branch
* Fix has location check to account for 0.0 locations
* Only prop in lat and long
* Add explanation
* Fix: Import vision-plugin function from wrapper file
* Add jest mock for new plugin function
* Add a cameraZoomRange default
* Small detox version bump
* Add a mocked camera with a take photo button
* An e2e mock for the computer vision plugin predicting a frame
* Mock taking a photo by loading the first photo from the CameraRoll
Closes#1981
* Write an integration test for PhotoImport; closes#1430
* Add test for photo importer -> group photos -> obs edit flow
* Remove global image-picker mock
* Get a few mocks working in __mocks__ folder
* Move more mocks into __mocks__
* Move mocks
* Move zustand mock
* Add more mocks to __mocks__
* More mocks
* Move more files to __mocks__ and audit existing mocks
* Mock react navigation in __mocks__
* Restore test to help with imports after jest env torn down
* Add fake timer to integration test with userEvent
* Add RN paper mock
* Obs detail screen skeleton; move safe area view to wrapper component
* Progress on obs detail
* Get ids and photos from api v2
* Fetch data needed for data tab in obs detail
* Create basic map for data tab, centered on lat/long
* Create linked realms for photos and identifications; access these on obs detail screen
* User Profile and more setup for test suite
* Delete coverage directory
* Add Jest coverage folder to gitignore
* Keep trying to mock out fetch for inatjs in ObsList.test.js
* Rename ObsList.test to match component name