TF-2764 Add CancelToken to download attachment for web

This commit is contained in:
dab246
2024-05-15 09:56:43 +07:00
committed by Dat H. Pham
parent 8d8728ec97
commit 89a489eb06
7 changed files with 28 additions and 9 deletions
@@ -153,7 +153,8 @@ class EmailRepositoryImpl extends EmailRepository {
AccountId accountId,
String baseDownloadUrl,
AccountRequest accountRequest,
StreamController<Either<Failure, Success>> onReceiveController
StreamController<Either<Failure, Success>> onReceiveController,
{CancelToken? cancelToken}
) {
return emailDataSource[DataSourceType.network]!.downloadAttachmentForWeb(
taskId,
@@ -161,7 +162,8 @@ class EmailRepositoryImpl extends EmailRepository {
accountId,
baseDownloadUrl,
accountRequest,
onReceiveController);
onReceiveController,
cancelToken: cancelToken);
}
@override