Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Unified Diff: pkg/observe/lib/src/list_path_observer.dart

Issue 27618002: package:observe fix various api issues (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/observe/lib/src/dirty_check.dart ('k') | pkg/observe/lib/src/metadata.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/lib/src/list_path_observer.dart
diff --git a/pkg/observe/lib/src/list_path_observer.dart b/pkg/observe/lib/src/list_path_observer.dart
index f7e620f22064b57422a3d4855309fd9182ba9273..f882e12ce361ec27e421b28f4121a8fb052560ac 100644
--- a/pkg/observe/lib/src/list_path_observer.dart
+++ b/pkg/observe/lib/src/list_path_observer.dart
@@ -11,7 +11,7 @@ part of observe;
/**
* Observes a path starting from each item in the list.
*/
-class ListPathObserver<E, P> extends ChangeNotifierBase {
+class ListPathObserver<E, P> extends ChangeNotifier {
final ObservableList<E> list;
final String _itemPath;
final List<PathObserver> _observers = <PathObserver>[];
@@ -46,8 +46,8 @@ class ListPathObserver<E, P> extends ChangeNotifierBase {
void _reduce() {
_scheduled = false;
- _value = _observers.map((o) => o.value);
- notifyChange(new PropertyChangeRecord(#value));
+ var newValue = _observers.map((o) => o.value);
+ _value = notifyPropertyChange(#value, _value, newValue);
}
void _scheduleReduce(_) {
« no previous file with comments | « pkg/observe/lib/src/dirty_check.dart ('k') | pkg/observe/lib/src/metadata.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698