TF-3372 Add onProgressController to get the progress of emptying task
This commit is contained in:
committed by
Dat H. Pham
parent
c735789709
commit
e327cf6b9c
@@ -1,5 +1,8 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:dartz/dartz.dart' as dartz;
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/filter/filter.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/properties/properties.dart';
|
||||
@@ -112,6 +115,8 @@ class LocalThreadDataSourceImpl extends ThreadDataSource {
|
||||
Session session,
|
||||
AccountId accountId,
|
||||
MailboxId mailboxId,
|
||||
int totalEmails,
|
||||
StreamController<dartz.Either<Failure, Success>> onProgressController
|
||||
) {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:dartz/dartz.dart' as dartz;
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/filter/filter.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/properties/properties.dart';
|
||||
@@ -115,13 +118,17 @@ class ThreadDataSourceImpl extends ThreadDataSource {
|
||||
Future<List<EmailId>> emptyMailboxFolder(
|
||||
Session session,
|
||||
AccountId accountId,
|
||||
MailboxId mailboxId
|
||||
MailboxId mailboxId,
|
||||
int totalEmails,
|
||||
StreamController<dartz.Either<Failure, Success>> onProgressController
|
||||
) {
|
||||
return Future.sync(() async {
|
||||
return await _threadIsolateWorker.emptyMailboxFolder(
|
||||
session,
|
||||
accountId,
|
||||
mailboxId
|
||||
mailboxId,
|
||||
totalEmails,
|
||||
onProgressController
|
||||
);
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user