MushroomObserver / mo-mobile

Mushroom Observer mobile app
MIT License
0 stars 1 forks source link

Up the size of lat/long fields to support all values between +/-180 d… #25

Closed mo-nathan closed 2 weeks ago

mo-nathan commented 2 months ago

…egress at a resolution of 30ft (1/10000 degrees)

mo-nathan commented 1 month ago

I'm now able to get GPS info for images from the new Camera (according to what I see in the console). However, I haven't figured out how to do the same sort of saving stuff that is going on in addPhotos in app/screens/CreateDraft/index.tsx. This is where all the image saving used to happen using the Callback that gets sent to AddPhotosButton. AddPhotosButton has the code that decides whether we're doing a Camera or a Gallery photo. The Camera used to have a simple function from react-native-image-picker (launchCamera) that just called the Callback. However, now with the newer component from react-native-vision-camera, I've created a new component (CameraModal) which seems like a reasonable approach. However, I think the Callback is specific to react-native-image-picker. The images data structures I get from the two routes are different. However, I think I've created a "draftImage" like "object" (really just a hash) that contains the important data. However, I don't know how to do this part of the addPhotos Callback:

      addDraftImages(draftImages);
      setDraftPhotoIds(concat(draftPhotoIds, newIds));
      updateDraftObservation({ id, changes: { name, draftPhotoIds, date } });

It seems to get redux-ish stuff that I don't comprehend. I think it's related, but I also don't get where the arguments that go into DraftWizard get there. It seems to have something to do with the connect function from react-redux along with mapStateToProjs and mapDistpatchToProps which make no sense to me. There's also a thing call withForwardedNavigationParams which again makes no sense to me.