Empty file of Identify user form in the directory created without saving the form
ODK Collect version
the store version 2023.3.1, the master version f46374638fb3023330f152cf716752f5accce077
Android version
10, 13
Device used
Redmi 9T, Pixel 6a
Problem description
An empty file of an instance of the Identify user form is created when the form is closed without saving (discard changes).
Steps to reproduce the problem
- Open to Identify user form.
- While on "Enter identity” dialog tap the device back button and discard changes.
Expected behavior
The file in the directory shouldn’t be created if the form wasn’t saved.
We tried to fix this issue in https://github.com/getodk/collect/pull/6020, but weren’t able to find a satisfactory solution. We agreed that a better option would be to refactor the way the dialog (asking for identity) is displayed and move it out of FormFillingActivity (see: https://github.com/getodk/collect/pull/6020#issuecomment-3318521191). As a side effect, this refactoring could also fix the issue.