setCurrentChatSession method

void setCurrentChatSession(
  1. ChatSession chatSession
)

Implementation

void setCurrentChatSession(ChatSession chatSession) {
  if (_currentChatSession?.conversationId == chatSession.conversationId &&
      _currentChatSession?.conversationType == chatSession.conversationType) {
    Alog.d(
        tag: logTag,
        content:
            'setCurrentChatSession repeat ${chatSession.conversationId} conversationType = ${chatSession.conversationType}');
    wight++;
    return;
  }
  _isLoading = false;
  _currentChatSession = chatSession;
  _currentChatIdNotifier.add(chatSession);
  Alog.d(
      tag: logTag,
      content:
          'setCurrentChatSession success ${chatSession.conversationId} conversationType = ${chatSession.conversationType}');
  _setCurrentChatCache();
}