mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-10-31 17:43:32 +03:00
notifySubscribers and equalityComparer are not used outside KnockoutJS
This commit is contained in:
parent
679d7356e0
commit
30e9b89d9b
9 changed files with 113 additions and 114 deletions
|
|
@ -149,7 +149,7 @@ function evaluateImmediate_CallReadThenEndDependencyDetection(state, dependencyD
|
|||
}
|
||||
|
||||
var computedFn = {
|
||||
"equalityComparer": valuesArePrimitiveAndEqual,
|
||||
equalityComparer: valuesArePrimitiveAndEqual,
|
||||
getDependenciesCount: function () {
|
||||
return this[computedState].dependenciesCount;
|
||||
},
|
||||
|
|
@ -303,17 +303,17 @@ var computedFn = {
|
|||
|
||||
if (changed) {
|
||||
if (!state.isSleeping) {
|
||||
computedObservable["notifySubscribers"](state.latestValue, "beforeChange");
|
||||
computedObservable.notifySubscribers(state.latestValue, "beforeChange");
|
||||
} else {
|
||||
computedObservable.updateVersion();
|
||||
}
|
||||
|
||||
state.latestValue = newValue;
|
||||
|
||||
computedObservable["notifySubscribers"](state.latestValue, "spectate");
|
||||
computedObservable.notifySubscribers(state.latestValue, "spectate");
|
||||
|
||||
if (!state.isSleeping && notifyChange) {
|
||||
computedObservable["notifySubscribers"](state.latestValue);
|
||||
computedObservable.notifySubscribers(state.latestValue);
|
||||
}
|
||||
if (computedObservable._recordUpdate) {
|
||||
computedObservable._recordUpdate();
|
||||
|
|
@ -321,7 +321,7 @@ var computedFn = {
|
|||
}
|
||||
|
||||
if (isInitial) {
|
||||
computedObservable["notifySubscribers"](state.latestValue, "awake");
|
||||
computedObservable.notifySubscribers(state.latestValue, "awake");
|
||||
}
|
||||
|
||||
return changed;
|
||||
|
|
@ -420,7 +420,7 @@ var pureComputedOverrides = {
|
|||
}
|
||||
|
||||
if (!state.isDisposed) { // test since evaluating could trigger disposal
|
||||
computedObservable["notifySubscribers"](state.latestValue, "awake");
|
||||
computedObservable.notifySubscribers(state.latestValue, "awake");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -438,7 +438,7 @@ var pureComputedOverrides = {
|
|||
}
|
||||
});
|
||||
state.isSleeping = true;
|
||||
this["notifySubscribers"](undefined, "asleep");
|
||||
this.notifySubscribers(undefined, "asleep");
|
||||
}
|
||||
},
|
||||
getVersion: function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue