reactronic 0.21.529 → 0.21.600
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -80,6 +80,7 @@ declare class Operation extends Observable implements Observer {
|
|
|
80
80
|
private static revokeAllSubscriptions;
|
|
81
81
|
private static propagateMemberChangeThroughSubscriptions;
|
|
82
82
|
private static enqueueDetectedReactions;
|
|
83
|
+
private static runQueuedReactionsLoop;
|
|
83
84
|
private unsubscribeFromAllObservables;
|
|
84
85
|
private subscribeTo;
|
|
85
86
|
private static canSubscribe;
|
|
@@ -521,18 +521,21 @@ class Operation extends Data_1.Observable {
|
|
|
521
521
|
}
|
|
522
522
|
static enqueueDetectedReactions(snapshot) {
|
|
523
523
|
const queue = Operation.queuedReactions;
|
|
524
|
-
const
|
|
524
|
+
const isReactionLoopRequired = queue.length === 0;
|
|
525
525
|
for (const r of snapshot.reactions)
|
|
526
526
|
queue.push(r);
|
|
527
|
-
if (
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
527
|
+
if (isReactionLoopRequired)
|
|
528
|
+
OperationController.runWithin(undefined, Operation.runQueuedReactionsLoop);
|
|
529
|
+
}
|
|
530
|
+
static runQueuedReactionsLoop() {
|
|
531
|
+
const queue = Operation.queuedReactions;
|
|
532
|
+
let i = 0;
|
|
533
|
+
while (i < queue.length) {
|
|
534
|
+
const reaction = queue[i];
|
|
535
|
+
reaction.runIfNotUpToDate(false, true);
|
|
536
|
+
i++;
|
|
535
537
|
}
|
|
538
|
+
Operation.queuedReactions = [];
|
|
536
539
|
}
|
|
537
540
|
unsubscribeFromAllObservables() {
|
|
538
541
|
var _a;
|