The reflux actions used here were asynchronous by default, and their execution was deferred until after all packages were loaded. Inside _completeActivation() the condition this._isReadingComplete() was therefore always true, so the packageActivationCompleted() triggered once for each package loaded. Making the actions synchronous fixes this problem.
Also, after loading is complete, the listeners need to be unregistered again. Otherwise there are issues when multiple managers are being used at once.
The reflux actions used here were asynchronous by default, and their execution was deferred until after all packages were loaded. Inside
_completeActivation()
the conditionthis._isReadingComplete()
was therefore always true, so thepackageActivationCompleted()
triggered once for each package loaded. Making the actions synchronous fixes this problem.Also, after loading is complete, the listeners need to be unregistered again. Otherwise there are issues when multiple managers are being used at once.
Tests included.