Skip to content
Snippets Groups Projects
Verified Commit 4d6ad710 authored by Erick Hitter's avatar Erick Hitter
Browse files

Only ignore queued clicks if they are more than two seconds old, so allow for reconnection delay

parent b449e703
Branches
Tags v1.0.0
No related merge requests found
......@@ -43,9 +43,15 @@ function listenToButton( bdAddr ) {
client.addConnectionChannel( cc );
cc.on( 'buttonUpOrDown', function( clickType, wasQueued, timeDiff ) {
if ( 'ButtonDown' === clickType && false === wasQueued ) {
buttonActivated( bdAddr );
if ( 'ButtonDown' !== clickType ) {
return;
}
if ( wasQueued && timeDiff > 2 ) {
return;
}
buttonActivated( bdAddr );
} );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment