feat(query): notify on changes

This commit is contained in:
vsavkin
2015-06-12 09:45:31 -07:00
parent 73d152506b
commit 5bfcca2d5b
11 changed files with 129 additions and 7 deletions

View File

@ -262,11 +262,15 @@ class _CodegenState {
/// them.
String _getCallOnAllChangesDoneBody() {
// NOTE(kegluneq): Order is important!
return _directiveRecords.reversed
var directiveNotifications = _directiveRecords.reversed
.where((rec) => rec.callOnAllChangesDone)
.map((rec) =>
'${_genGetDirective(rec.directiveIndex)}.onAllChangesDone();')
.join('');
return '''
_dispatcher.notifyOnAllChangesDone();
${directiveNotifications}
''';
}
String _genLocalDefinitions() =>