| Index: pkg/barback/lib/src/phase_output.dart
|
| diff --git a/pkg/barback/lib/src/phase_output.dart b/pkg/barback/lib/src/phase_output.dart
|
| index ae309d9820eba63990cd6e77601aabc457d5a267..8082e54ac546e81491886cc9841c932e9fcc4e24 100644
|
| --- a/pkg/barback/lib/src/phase_output.dart
|
| +++ b/pkg/barback/lib/src/phase_output.dart
|
| @@ -28,7 +28,7 @@ class PhaseOutput {
|
|
|
| /// The asset node for this output.
|
| AssetNode get output => _outputController.node;
|
| - final AssetNodeController _outputController;
|
| + AssetNodeController _outputController;
|
|
|
| /// The assets for this output.
|
| ///
|
| @@ -59,6 +59,18 @@ class PhaseOutput {
|
| _watchAsset(node);
|
| }
|
|
|
| + /// Removes all existing listeners on [output] without actually closing
|
| + /// [this].
|
| + ///
|
| + /// This marks [output] as removed, but immediately replaces it with a new
|
| + /// [AssetNode] in the same state as the old output. This is used when adding
|
| + /// a new [Phase] to cause consumers of the prior phase's outputs to be to
|
| + /// start consuming the new phase's outputs instead.
|
| + void removeListeners() {
|
| + _outputController.setRemoved();
|
| + _outputController = new AssetNodeController.from(_assets.first);
|
| + }
|
| +
|
| /// Watches [node] for state changes and adjusts [_assets] and [output]
|
| /// appropriately when they occur.
|
| void _watchAsset(AssetNode node) {
|
|
|