jorgefspereira / persona_flutter

Persona Inquiry for Flutter. Integrates the native iOS, Android SDKs.
https://pub.dev/packages/persona_flutter
MIT License
13 stars 27 forks source link

Android: Cannot cancel/retry/run tests/etc. #51

Closed qui-jason closed 3 months ago

qui-jason commented 3 months ago

PR #45 seems incorrect to me - the conditional isResultSubmitted prevents subsequent attempts on Android if the user clicks cancel, errors out. This also presents a problem in automated testing, where the framework is not necessarily reloaded across runs that need to successfully complete in dev. To be clear, this change made it such that callbacks after inquiry fire only once, meaning that only two inquiry attempts can occur and the second will leave the UI hanging.

I suggest reverting #45, perhaps there is another issue at play in the submitter's code. We don't suffer from any issues when clicking cancel. Alternatively, provide a way to reset this variable, or do it when start() is called.

qui-jason commented 3 months ago

It could go here if you wanted to keep the change, for example. Something like:

isResultSubmitted = false