getodk / collect

ODK Collect is an Android app for filling out forms. It's been used to collect billions of data points in challenging environments around the world. Contribute and make the world a better place! ✨📋✨
https://docs.getodk.org/collect-intro
Other
700 stars 1.35k forks source link

Fixed cleaning instance dirs that are not needed #6093

Closed grzesiek2010 closed 1 month ago

grzesiek2010 commented 1 month ago

Closes #6057

Why is this the best possible solution? Were any other approaches considered?

It brings back the behavior we had with the old savepoints back. When a user rejects a savepoint (that belongs to a blank form) we should get rid of an instance dir created for that form as it's not needed.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

When a user does not want to load a savepoint for a blank form the instance dir should be removed. That's the only change. Please make sure it only happens for savepoints that belong to blank forms. Otherwise, we don't want to remove the instance dir as it contains an instance file.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

WKobus commented 1 month ago

Tested with Success!

Verified on device with Android: 11

Verified cases:

srujner commented 1 month ago

Tested with Success!

Verified on device with Android: 12,13

dbemke commented 1 month ago

Tested with Success!

Verified on device with Android: 10, 14