updateFromBase method

  1. @override
void updateFromBase(
  1. List updates
)
override

Implementation

@override
void updateFromBase(List updates) {
  for (List data in updates) {
    if (data[0] is LocalNode) {
      LocalNode node = data[0];
      if (data[1] == '+') {
        if (!subscriptions.containsKey(node.path)) {
          subscriptions[node.path] = _QuerySubscription(this, node);
        } else {
          subscriptions[node.path]?.removed = false;
        }
      } else if (data[1] == '-') {
        if (subscriptions.containsKey(node.path)) {
          subscriptions[node.path]?.removed = true;
          updatePath(node.path);
        }
      }
    }
  }
}