implement / fix combo timeout

This commit is contained in:
Daniel Sommer 2022-03-28 17:17:31 +02:00
parent c13b123423
commit bb1cca0433
2 changed files with 2 additions and 4 deletions

View file

@ -4,7 +4,7 @@
"timestamp": "DD.MM.YYYY HH:mm:ss:SS"
},
"combos": {
"delay": 5000
"delay": 1000
},
"watchers": [
{

View file

@ -239,13 +239,11 @@ class Keyfilter {
return true;
}
hasComboTimedOut() {
return false;
return global.config?.combos?.delay !== undefined &&
this.currentCombo?.timestamp !== undefined &&
new Date().getTime() - this.currentCombo.timestamp > global.config?.combos?.dela;
new Date().getTime() - this.currentCombo.timestamp > global.config?.combos?.delay;
}
resetCurrentCombo() {
console.debug('resetting current combo...');
this.currentCombo = undefined;
}
isValid() {