mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
KnockoutJS drop unused throttleEvaluation
This commit is contained in:
parent
2876f92f4d
commit
05b1e96046
1 changed files with 2 additions and 8 deletions
|
|
@ -205,14 +205,8 @@ var computedFn = {
|
|||
return target['subscribe'](this.evaluatePossiblyAsync, this);
|
||||
},
|
||||
evaluatePossiblyAsync() {
|
||||
var computedObservable = this,
|
||||
throttleEvaluationTimeout = computedObservable['throttleEvaluation'];
|
||||
if (throttleEvaluationTimeout >= 0) {
|
||||
clearTimeout(this[computedState].evaluationTimeoutInstance);
|
||||
this[computedState].evaluationTimeoutInstance = setTimeout(() =>
|
||||
computedObservable.evaluateImmediate(true /*notifyChange*/)
|
||||
, throttleEvaluationTimeout);
|
||||
} else if (computedObservable._evalDelayed) {
|
||||
var computedObservable = this;
|
||||
if (computedObservable._evalDelayed) {
|
||||
computedObservable._evalDelayed(true /*isChange*/);
|
||||
} else {
|
||||
computedObservable.evaluateImmediate(true /*notifyChange*/);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue