hay / wiki-tools

Code for my Wikimedia Labs Tools account
http://tools.wmflabs.org/hay
91 stars 26 forks source link

Rapidly trying to depict gives a 'Could not add the depicts statement' error. #127

Closed hay closed 1 year ago

hay commented 1 year ago

When rapidly pressing the 'Yes' button (perhaps by using the 1 key) things might break because of overloading the API. In this case you will get a 'Could not add depicts statement error'.

It might be better to disable the shortcut to prevent this from happening.

PiotrGackowski commented 1 year ago

As far as I remember this is intentional - because you can get image from next pair of "person and image of person".

hay commented 1 year ago

I've now adapted this. Whenever you press a keyboard shortcut or use a button the actions will be locked until the next image is loaded. Because of the changes in #93 this should not result in a slowdown.