clearCurrentChatSession method
void
clearCurrentChatSession()
Implementation
void clearCurrentChatSession(String? sessionId,
NIMConversationType conversationType, String conversationId) {
if (currentChatSession?.conversationId == conversationId &&
currentChatSession?.conversationType == conversationType) {
if (wight > 1) {
wight--;
Alog.d(
tag: logTag,
content:
'clearCurrentChatSession wight more than 1 $conversationId conversationType = $conversationType');
return;
}
++_cacheGeneration;
_isLoading = false;
_currentChatSession = null;
_clearCacheSync();
wight = 0;
_currentChatIdNotifier.add(null);
Alog.d(
tag: logTag,
content:
'clearCurrentChatSession success $conversationId conversationType = $conversationType');
}
}