Your amended #7 code works better, that is to say at a quick test you seem to have fixed it. But I see no single click reports until the 250 ms period had passed, long press or no.
Crank that 250 up to 1000 and you can see, no report until that time has passed.
It is impossible to respond rapidly and have single and double clicking handled without doing it right - single click and if another happens soon enough double.
a7