subscribeIfNotUnsubscribed method

void subscribeIfNotUnsubscribed()

Performs subscription if this channel was not unsubscibed intentionally. Recommended to use while listening for PusherChannelsClient.onConnectionEstablished

Implementation

void subscribeIfNotUnsubscribed() {
  if (state?.status == ChannelStatus.unsubscribed) {
    return;
  }
  subscribe();
}