onChatThreadDestroy method

  1. @override
void onChatThreadDestroy(
  1. ChatThreadEvent event
)
override

Implementation

@override
void onChatThreadDestroy(ChatThreadEvent event) async {
  int index = msgModelList.indexWhere(
      (element) => element.message.msgId == event.chatThread?.messageId);
  if (index != -1) {
    msgModelList[index] = msgModelList[index].clearThread();
    lastActionType = MessageLastActionType.originalPosition;
    refresh();
  }
}