handleDownloadProgressEvent static method

void handleDownloadProgressEvent(
  1. V2TimMessageDownloadProgress progress
)

Implementation

static void handleDownloadProgressEvent(V2TimMessageDownloadProgress progress) {
  updateCurrentDownloadMessage(progress);

  String messageIdentfif = "${progress.msgID}_${progress.type}_${progress.isSnapshot}";
  if (!messageDownloadFinishedList.contains(messageIdentfif) && progress.isFinish == true) {
    messageDownloadFinishedList.add(messageIdentfif);
    console("${progress.msgID} isError ${progress.isError} download finished");

    updateMessageLocalUrlInMemory(progress);

    currentDownloadingList.removeWhere((ele) => ele.getUniqueueKey() == messageIdentfif);
  }
}