TF-825 Download email as EML file (#2854)

This commit is contained in:
Dat Vu
2024-05-16 15:50:01 +07:00
committed by GitHub
parent 175f285e51
commit ca4cf68f87
29 changed files with 153 additions and 26 deletions
@@ -351,12 +351,12 @@ class EmailAPI with HandleSetErrorMixin {
headers: headerParam,
responseType: ResponseType.bytes),
onReceiveProgress: (downloaded, total) {
log('DownloadClient::downloadFileForWeb(): downloaded = $downloaded | total: $total');
log('EmailAPI::downloadFileForWeb(): downloaded = $downloaded | total: $total');
double progress = 0;
if (downloaded > 0 && total > downloaded) {
if (downloaded > 0 && total >= downloaded) {
progress = (downloaded / total) * 100;
}
log('DownloadClient::downloadFileForWeb(): progress = ${progress.round()}%');
log('EmailAPI::downloadFileForWeb(): progress = ${progress.round()}%');
onReceiveController.add(Right(DownloadingAttachmentForWeb(
taskId,
attachment,