onIdentityChanged method

  1. @override
void onIdentityChanged(
  1. UserId me
)
override

Handles identity changes to the provided UserId.

Implementation

@override
void onIdentityChanged(UserId me) {
  super.onIdentityChanged(me);

  Log.debug('onIdentityChanged($me)', '$runtimeType');

  _localSubscription?.cancel();
  _remoteSubscription?.close(immediate: true);

  // For popups this store should be used for connectivity check only.
  if (!me.isLocal && !WebUtils.isPopup) {
    _initLocalSubscription();
    _initRemoteSubscription();
  }
}