max-kamps / jpd-breader

MIT License
100 stars 24 forks source link

Protect against double-reviewing #81

Open alexanderabramov opened 5 months ago

alexanderabramov commented 5 months ago

I've noticed that I'd somehow added 3 jpdb reviews for the same word within a couple of seconds of each other using jpdb reader popup.

It could be because a finger slipped and clicked the review button twice, or it could be because jpdb api is unresponsive and an api call is auto-retried, or both.

Adding double reviews seems to throw jpdb algorithm off somewhat. E.g. a new word with 1 "good" review gets a 6 day timer, whereas with 2 "good" reviews within a second of each other it can get an 11 day timer. But let's leave aside for the moment that jpdb algorithm itself should deal with those better.

I'd like to suggest that jpdb reader either adds a protection against double reviews of some sort, or a clear indication that a review is already sent to jpdb and is awaiting an api response. Possibly some sort of loader, or grayed-out / inactive buttons for a period of time.