TF-1900 Auto sync Sending Queue after work manager completed
(cherry picked from commit e68a8fdc49c600224b93e25f60ed6b8ecf1afe84)
This commit is contained in:
@@ -4,5 +4,5 @@ import 'package:jmap_dart_client/jmap/core/user_name.dart';
|
||||
import 'package:tmail_ui_user/features/composer/domain/model/sending_email.dart';
|
||||
|
||||
abstract class SendingQueueRepository {
|
||||
Future<List<SendingEmail>> getAllSendingEmails(AccountId accountId, UserName userName);
|
||||
Future<List<SendingEmail>> getAllSendingEmails(AccountId accountId, UserName userName, {bool needToReopen = false});
|
||||
}
|
||||
@@ -11,10 +11,10 @@ class GetAllSendingEmailInteractor {
|
||||
|
||||
GetAllSendingEmailInteractor(this._sendingQueueRepository);
|
||||
|
||||
Stream<Either<Failure, Success>> execute(AccountId accountId, UserName userName) async* {
|
||||
Stream<Either<Failure, Success>> execute(AccountId accountId, UserName userName, {bool needToReopen = false}) async* {
|
||||
try {
|
||||
yield Right<Failure, Success>(GetAllSendingEmailLoading());
|
||||
final sendingEmails = await _sendingQueueRepository.getAllSendingEmails(accountId, userName);
|
||||
final sendingEmails = await _sendingQueueRepository.getAllSendingEmails(accountId, userName, needToReopen: needToReopen);
|
||||
yield Right<Failure, Success>(GetAllSendingEmailSuccess(sendingEmails));
|
||||
} catch (e) {
|
||||
yield Left<Failure, Success>(GetAllSendingEmailFailure(e));
|
||||
|
||||
Reference in New Issue
Block a user