Closed hundredball closed 1 year ago
Hi @mfrants , could you check this PR when you're available?
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.
Okay, I tested and it looks good. Will merge now.
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 toobservation_page
with the same photo when they press cancel in camera.Reason
The error occurs since
_imageFile
is notNone
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 toobservation_page
.Solution
Set
_imageFile
to null if user pressed cancel in camera (pickImage
returns null)