Index: pkg/barback/lib/src/phase_forwarder.dart |
diff --git a/pkg/barback/lib/src/phase_forwarder.dart b/pkg/barback/lib/src/phase_forwarder.dart |
index c1f7abdf76443adeff002eaf27287513102cb9ee..b540acdbd5098ed4ba40d05041968f45d2050a28 100644 |
--- a/pkg/barback/lib/src/phase_forwarder.dart |
+++ b/pkg/barback/lib/src/phase_forwarder.dart |
@@ -7,6 +7,7 @@ library barback.phase_forwarder; |
import 'dart:async'; |
import 'asset_node.dart'; |
+import 'asset_node_set.dart'; |
/// A class that takes care of forwarding assets within a phase. |
/// |
@@ -40,7 +41,7 @@ class PhaseForwarder { |
int _numChannels; |
/// The intermediate forwarded assets. |
- final _intermediateAssets = new Set<AssetNode>(); |
+ final _intermediateAssets = new AssetNodeSet(); |
/// The final forwarded asset. |
/// |
@@ -69,11 +70,7 @@ class PhaseForwarder { |
} |
_intermediateAssets.add(asset); |
- |
- asset.onStateChange.listen((state) { |
- if (state.isRemoved) _intermediateAssets.remove(asset); |
- _adjustOutput(); |
- }); |
+ asset.onStateChange.listen((_) => _adjustOutput()); |
_adjustOutput(); |
} |