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);
|
return target['subscribe'](this.evaluatePossiblyAsync, this);
|
||||||
},
|
},
|
||||||
evaluatePossiblyAsync() {
|
evaluatePossiblyAsync() {
|
||||||
var computedObservable = this,
|
var computedObservable = this;
|
||||||
throttleEvaluationTimeout = computedObservable['throttleEvaluation'];
|
if (computedObservable._evalDelayed) {
|
||||||
if (throttleEvaluationTimeout >= 0) {
|
|
||||||
clearTimeout(this[computedState].evaluationTimeoutInstance);
|
|
||||||
this[computedState].evaluationTimeoutInstance = setTimeout(() =>
|
|
||||||
computedObservable.evaluateImmediate(true /*notifyChange*/)
|
|
||||||
, throttleEvaluationTimeout);
|
|
||||||
} else if (computedObservable._evalDelayed) {
|
|
||||||
computedObservable._evalDelayed(true /*isChange*/);
|
computedObservable._evalDelayed(true /*isChange*/);
|
||||||
} else {
|
} else {
|
||||||
computedObservable.evaluateImmediate(true /*notifyChange*/);
|
computedObservable.evaluateImmediate(true /*notifyChange*/);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue