TF-2764 Add CancelToken to download attachment for web
This commit is contained in:
@@ -134,7 +134,8 @@ class EmailDataSourceImpl extends EmailDataSource {
|
||||
AccountId accountId,
|
||||
String baseDownloadUrl,
|
||||
AccountRequest accountRequest,
|
||||
StreamController<Either<Failure, Success>> onReceiveController
|
||||
StreamController<Either<Failure, Success>> onReceiveController,
|
||||
{CancelToken? cancelToken}
|
||||
) {
|
||||
return Future.sync(() async {
|
||||
return await emailAPI.downloadAttachmentForWeb(
|
||||
@@ -143,7 +144,8 @@ class EmailDataSourceImpl extends EmailDataSource {
|
||||
accountId,
|
||||
baseDownloadUrl,
|
||||
accountRequest,
|
||||
onReceiveController);
|
||||
onReceiveController,
|
||||
cancelToken: cancelToken);
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,15 @@ class EmailHiveCacheDataSourceImpl extends EmailDataSource {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Uint8List> downloadAttachmentForWeb(DownloadTaskId taskId, Attachment attachment, AccountId accountId, String baseDownloadUrl, AccountRequest accountRequest, StreamController<Either<Failure, Success>> onReceiveController) {
|
||||
Future<Uint8List> downloadAttachmentForWeb(
|
||||
DownloadTaskId taskId,
|
||||
Attachment attachment,
|
||||
AccountId accountId,
|
||||
String baseDownloadUrl,
|
||||
AccountRequest accountRequest,
|
||||
StreamController<Either<Failure, Success>> onReceiveController,
|
||||
{CancelToken? cancelToken}
|
||||
) {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user