dimagi / commcare-android

Offline First Android software client for CommCare, the world's largest platform for designing, managing, and deploying robust mobile applications to frontline workers worldwide
https://www.dimagi.com/open-source/
Apache License 2.0
37 stars 25 forks source link

Potential fix for incorrect session recovery #2836

Closed shubham1g5 closed 1 week ago

shubham1g5 commented 1 week ago

Summary

This is a potential fix for some of the issues we are seeing where user gets restored to a saved session state even after saving the form as complete. Today we clear this state after the Form Saved async task has been finished successfully but that may cause issues in scenarios when the activity get deattached from the async task itself.

I have not been able to reproduce these issues but the change is harmless and would love to see if that fixes the issue for users. If not, also added some helpful logs to get more info on if we are managing the interrupted state correctly.

Safety Assurance

Safety story

Small code change with all code pathways already in usage
avazirna commented 1 week ago

@damagatchi retest this please