Browse Source
Merge pull request #1724 from juan-cortes/LL-735
LL-735 Adds a maxTime for the debounce on the auto-lock idler
gre-patch-1
Gaëtan Renaudeau
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/components/Idler.js
|
|
@ -40,7 +40,7 @@ class Idler extends PureComponent<Props> { |
|
|
|
|
|
|
|
lastAction: number = -1 |
|
|
|
|
|
|
|
debounceOnChange = debounce(_ => this.idleTimeHandler(), 1000) |
|
|
|
debounceOnChange = debounce(this.idleTimeHandler, 1000, { maxWait: 1000, leading: true }) |
|
|
|
|
|
|
|
checkForAutoLock = _ => { |
|
|
|
const timeout = this.props.autoLockTimeout |
|
|
|