processMetaSub method

  1. @override
void processMetaSub(
  1. List<TopicSubscription> subscriptions
)
override

Override the original Topic.processMetaSub

Implementation

@override
void processMetaSub(List<TopicSubscription> subscriptions) {
  var updateCount = _contacts.length;
  _contacts = {};

  for (var sub in subscriptions) {
    var indexBy = sub.topic ?? sub.user ?? '';
    _contacts[indexBy] = sub;
    updateCount++;
    onMetaSub.add(sub);
  }

  if (updateCount > 0) {
    onSubsUpdated.add(_contacts.values.toList());
  }
}