pangeachat / client

Learn a language while texting your friends
https://krille-chan.github.io/fluffychat/
GNU Affero General Public License v3.0
1 stars 2 forks source link

If you click fast enough, you'll get the same step twice in IT #343

Closed wcjord closed 22 hours ago

wcjord commented 2 weeks ago

Pretty sure it happens if you select an option faster than the previous one being returned.

wcjord commented 1 week ago

@casualWaist Hey I can suggest a potential solution for this which is the same as we've done for a number of our API calls that have the potential of getting called twice. Implement a caching mechanism around the API call like in text_to_speech_controller.dart so that, if it already made the request before, it'll return the cached result and not call it again. This avoids figuring out why the request is happening twice and I believe should fix it. It is also possible that this will avoid making the API call twice but still result in the step being displayed twice. In this case, you'll need to dig further.