listenToAtSignChange method

  1. @override
void listenToAtSignChange(
  1. SwitchAtSignEvent switchAtSignEvent
)

Implementation

@override
void listenToAtSignChange(SwitchAtSignEvent switchAtSignEvent) {
  // Checks if the instance of AtClientImpl belongs to previous atSign. If Yes,
  // the compaction job is stopped and removed from changeListener list.
  if (switchAtSignEvent.previousAtClient?.getCurrentAtSign() ==
      getCurrentAtSign()) {
    _atClientCommitLogCompaction!.stopCompactionJob();
    _atClientManager.removeChangeListeners(this);
  }
}