updateLastMessageOnEdited method

  1. @override
dynamic updateLastMessageOnEdited(
  1. BaseMessage message
)
override

Implementation

@override
updateLastMessageOnEdited(BaseMessage message) async {
  int matchingIndex = getMatchingIndexFromKey(message.conversationId!);

  if (matchingIndex != -1) {
    if (list[matchingIndex].lastMessage?.id == message.id) {
      list[matchingIndex].lastMessage = message;
      update();
    }
  }
}