CalCOFI / OceanView

App that can incentivize ocean users to report their observations
1 stars 0 forks source link

Fix issue on leaving camera screen #23

Closed hundredball closed 1 year ago

hundredball commented 1 year ago

Issue

After taking a photo and entering observation_page, that photo is persistent while that observation is discarded without saving. The user will keep going to observation_page with the same photo when they press cancel in camera.

Reason

The error occurs since _imageFile is not None after the first picture is taken. Even if user cancels camera and _pickImage didn't do anything, previous _imageFile is still persistent and will navigate user to observation_page.

Solution

Set _imageFile to null if user pressed cancel in camera (pickImage returns null)

hundredball commented 1 year ago

Hi @mfrants , could you check this PR when you're available?

mfrants commented 1 year ago

Hi Chieh. I’ll get it done by tomorrow.

Marina Frants (she/her/hers) Information Manager, CCE-LTER/CalCOFI Scripps Institution of Oceanography, La Jolla, CA @.***

On Apr 3, 2023, at 8:06 AM, Chieh Hsu @.***> wrote:

Hi @mfrants https://urldefense.com/v3/__https://github.com/mfrants__;!!Mih3wA!EyyiFUP-lbXI26D7FBeGodNBdloFZTgVstd6d6mjUyqCXVcTI4X3QYP9cczJLHyrM5zJQAufcLLgmi2gR8OL9NDJ$ , could you check this PR when you're available?

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/CalCOFI/OceanView/pull/23*issuecomment-1494499685__;Iw!!Mih3wA!EyyiFUP-lbXI26D7FBeGodNBdloFZTgVstd6d6mjUyqCXVcTI4X3QYP9cczJLHyrM5zJQAufcLLgmi2gR0nam9mQ$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AV6LPWW2CA3RPCF63D2JQB3W7LRONANCNFSM6AAAAAAWKCKO4E__;!!Mih3wA!EyyiFUP-lbXI26D7FBeGodNBdloFZTgVstd6d6mjUyqCXVcTI4X3QYP9cczJLHyrM5zJQAufcLLgmi2gR_eqB3mZ$. You are receiving this because you were mentioned.

mfrants commented 1 year ago

Okay, I tested and it looks good. Will merge now.