digidem / comapeo-mobile

The next version of Mapeo mobile
GNU General Public License v3.0
5 stars 1 forks source link

feat: deleting photos in preview screen #385

Closed CDFN closed 4 months ago

CDFN commented 4 months ago

Closes #230

This PR adds feature enabling people to delete photo attachments from observation draft.

Also corrected parameter name in draft observation store, as it was id previously which actually was original uri of a photo.

By accident I did little more than scope of the issue, as photos in already created observations are possible to delete too (including deleting them from attachments on backend). However everything that was unasked for is hidden, to enable deleting photos in already created observations just pass deletable: true when navigating to PhotoPreviewModal screen in Observation screen. Worth nothing there is no permission check, as currently deviceId everywhere is mocked, so this would need to be added too before enabling deleting in existing observations.