removeConversationListener method

Future<void> removeConversationListener({
  1. String? listenerUuid,
  2. required bool hasListener,
})

Implementation

Future<void> removeConversationListener({
  String? listenerUuid,
  required bool hasListener,
}) async {
  if (listenerUuid != null && listenerUuid.isNotEmpty) {
    _conversationListener.remove(listenerUuid);
    if (_conversationListener.isNotEmpty) {
      return;
    }
  }
  if (!hasListener) {
    _conversationListener.clear();
  }
  if (_conversationListener.isEmpty) {
    timeweb!.off(EventType.CONVERSATION_LIST_UPDATED, _conversationListenerWeb);
  }
}