onMessageSendSuccess method
Implementation
@override
void onMessageSendSuccess(String msgId, Message msg) {
final index = msgModelList.indexWhere((element) =>
element.message.msgId == msgId && msg.status != element.message.status);
if (index != -1) {
msgModelList[index] = msgModelList[index].copyWith(
message: msg,
);
refresh();
try {
ChatUIKit.instance.deleteLocalThreadMessageById(
threadId: thread!.threadId,
messageId: msg.msgId,
);
} catch (e) {
chatPrint('delete local thread message error: $e');
}
}
}