Skip to content

Commit

Permalink
Refactor and deprecate parts of ObservableList... (#12)
Browse files Browse the repository at this point in the history
* Refactor ObservableList, start more deprecations.

* More tests and fixes.

* Fix remaining tests.

* Add changelog for 0.18

* Dartfmt.

* Fix bad merge.

* Tiny changes.
  • Loading branch information
matanlurey authored Nov 22, 2016
1 parent 3d1cbce commit ca00061
Show file tree
Hide file tree
Showing 12 changed files with 921 additions and 681 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 0.18.0

* Refactor and deprecate `ObservableList`-specific API
* `ObservableList.applyChangeRecords`
* `ObservableList.calculateChangeRecords`
* `ObservableList.withLength`
* `ObservableList.deliverListChanges`
* `ObservableList.discardListChanges`
* `ObservableList.hasListChanges`
* `ObservableList.listChanges`
* `ObservableList.notifyListChange`
* Potentially breaking: `ObservableList` may no longer be extended

It is also considered deprecated to be notified of `length`, `isEmpty`
and `isNotEmpty` `PropertyChangeRecord`s on `ObservableList` - in a
future release `ObservableList.changes` will be
`Stream<List<ListChangeRecord>>`.

## 0.17.0+1

* Revert `PropertyChangeMixin`, which does not work in dart2js
Expand Down
2 changes: 1 addition & 1 deletion lib/observable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
library observable;

export 'src/change_notifier.dart' show ChangeNotifier, PropertyChangeNotifier;
export 'src/collections.dart' show ObservableList;
export 'src/differs.dart' show Differ, EqualityDiffer, ListDiffer, MapDiffer;
export 'src/records.dart'
show ChangeRecord, ListChangeRecord, MapChangeRecord, PropertyChangeRecord;
export 'src/observable.dart';
export 'src/observable_list.dart';
export 'src/observable_map.dart';
export 'src/to_observable.dart';
1 change: 0 additions & 1 deletion lib/src/change_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class ChangeNotifier<C extends ChangeRecord> implements Observable<C> {
///
/// Returns `true` if changes were emitted.
@override
@protected
@mustCallSuper
bool deliverChanges() {
List<ChangeRecord> changes;
Expand Down
1 change: 1 addition & 0 deletions lib/src/collections.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export 'collections/observable_list.dart';
Loading

0 comments on commit ca00061

Please sign in to comment.