mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
ko.utils.setTimeout to native setTimeout
This commit is contained in:
parent
9014f08f35
commit
5cb4d338a1
5 changed files with 7 additions and 9 deletions
|
|
@ -216,7 +216,7 @@ var computedFn = {
|
|||
throttleEvaluationTimeout = computedObservable['throttleEvaluation'];
|
||||
if (throttleEvaluationTimeout && throttleEvaluationTimeout >= 0) {
|
||||
clearTimeout(this[computedState].evaluationTimeoutInstance);
|
||||
this[computedState].evaluationTimeoutInstance = ko.utils.setTimeout(() =>
|
||||
this[computedState].evaluationTimeoutInstance = setTimeout(() =>
|
||||
computedObservable.evaluateImmediate(true /*notifyChange*/)
|
||||
, throttleEvaluationTimeout);
|
||||
} else if (computedObservable._evalDelayed) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function throttle(callback, timeout) {
|
|||
var timeoutInstance;
|
||||
return () => {
|
||||
if (!timeoutInstance) {
|
||||
timeoutInstance = ko.utils.setTimeout(() => {
|
||||
timeoutInstance = setTimeout(() => {
|
||||
timeoutInstance = 0;
|
||||
callback();
|
||||
}, timeout);
|
||||
|
|
@ -43,7 +43,7 @@ function debounce(callback, timeout) {
|
|||
var timeoutInstance;
|
||||
return () => {
|
||||
clearTimeout(timeoutInstance);
|
||||
timeoutInstance = ko.utils.setTimeout(callback, timeout);
|
||||
timeoutInstance = setTimeout(callback, timeout);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue