* Flag Id Modal created.
* Flag item modal radio buttons, styling, cancel button
* Flag Item Modal, Api Flags file created
* Added id field in Identifications realm schema, Flag Item Modal API call
* Clear form, toggle function, click title not just checkbox to toggle
* Fixed android checkbox toggle.
* Clean up. Flag ID ObsDetail. Closes#301.
* Flag realm model, flagged status shown on initial load
* Refresh observation after item flagged. In Progress.
* Remove console logs, add onError
* save button loading spinner
* Realm 31 migration for obsservation updated_at
* Flags test file
* FlagItemModal tests
* FlagItemModal tests
---------
Co-authored-by: Amanda Bullington <albullington@gmail.com>
* Rename some functions and variables
* Rename function
* Revert to original timeout for tokens
* Get JWT for a 401 or 403 http errors in the react-query QueryClient retry handler
* Log API error to new logger
* Fetch token on every render in useApiToken hook
* Remove commented code
* Add comment
* Remove useEffect from useApiToken
* Revert "Remove useEffect from useApiToken"
This reverts commit 9cf1e0c0bc.
Primary bug was that requests to POST /v2/observation_photos were using the
obs serial ID instead of the obs UUID.
Another major problem was that uploads always quit before the last observation
when there were multiple observations to upload, which I address by changing
the way we set `allObsToUpload` in `useLocalObservations`.
Also added a signOut test helper... and maybe have introduced some problems
with parallel test execution as a result, as parallel jest runs don't seem to
totally separate with regards to the in-memory realm db. Something to think
about.
* Remove delete option for observations not in realm
* Add mutation for delete observation
* Hide delete option for observations not persisted to realm
* Close kebab menu when item pressed; this allows dialog to respond to first user
press
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Rewrite remote observation & update fetching using useQuery in ObsList
* Fix ObsList test by adding query provider
* Add padding to infinite scroll view indicator
* Only set next uuid for obslist if not still loading results from last api call
* Improve how ObsList works when observations don't fill screen
* Remove explore, explore provider, dropdown menu, and related screens; fix tests
* Move setIdBelow function into onEndReached
* Allow editing of existing id; remove unused id buttons; closes#230 and closes#231
* Remove unused text component & update IdentificationSection to tailwind css
* Remove unused obsEdit styles; convert styles to tailwind
* Remove unused bottom modal component and obsedit stylesheet
* Add comments to useEffect for opening local observation; convert realm object to JSON
* ObsEdit loads obs from db only when required
* Use observation update API call for observations already on the server
* Change wasSynced to instance method; only upload unsynced evidence
* Move keyboard aware scroll mock to jest.setup
* Await uploading evidence instead of returning a different response
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Show skeleton UI for comment and update with real comment from server
* Update styling in ActivityItem to use tailwind; fix code combining id and comment arrays
* Use tailwind styling in ObsDetails
* Styling updates; remove unneeded code from ObsDetails test
* Show loading wheel when comment submitted; clear comment box when backdrop tapped
* Remove console log
* Fix infinite loop when setting ids; return error from api so useQuery doesn't produce an undefined error
* Add throw option to fetchRemoteObservation so error is thrown when uuid doesn't exist
* Use authenticated query for search results
* Use search API for fetching places from Settings
* Use authenticated query for authorized applications
* Use authenticated query to fetch user.me
* Move fetch/search api calls into react query format, out of hooks
* Update with react query instead of hooks
* Fetch list of blocked and muted users with authenticated query
* Added Podfile postinstall block to get app running in a Simulator
* Use auth query in identify
* Upgrade @realm/react library to 0.4.0; fixes initialization error on android due to importing realm
* Use authquery for explore provider
* Use mutations for blocking/muting users, invalidating queries, and refetching settings data
* Add react mutation to create/update/delete api calls
* Use mutation for creating identification on identity/obs detail screens
* Use mutations to update and delete relationships
* Use mutation to revoke authorized apps
* Use mutation for updating user settings
* Fix ids on activity tab; fix safe area view; fix mark viewed
* Limit fields for remote observation api call
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Use authenticated query for search results
* Use search API for fetching places from Settings
* Use authenticated query for authorized applications
* Use authenticated query to fetch user.me
* Move fetch/search api calls into react query format, out of hooks
* Update with react query instead of hooks
* Fetch list of blocked and muted users with authenticated query
* Added Podfile postinstall block to get app running in a Simulator
* Use auth query in identify
* Upgrade Realm to 11.0.0-rc.0, most recent version that will work with RN 0.68.2
* Upgrade @realm/react library to 0.4.0; fixes initialization error on android due to importing realm
* Use authquery for explore provider
* ObsDetail wasn't showing the edit button for obs created while signed out
* simplified ObsEditHeader so it takes a full observation instead of relying
on the ObsEditContext
* ObsEdit now accepts an obs UUID as a param and loads that if the context
doesn't have a current obs
* null checks for API methods, mostly to prevent requests that won't work b/c
of missing params
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Start using React Query to make remote data requests
* Renaming, standardized error handling from API calls, moving code
* Fixed messages test; changed useQuery mocking approach
* React Query should only retry for network issues
* Tried using useAuthenticatedRequest on TaxonDetail
* Clear the React Query cache on sign out
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>