TF-1810 Implement get detailed email from notification

(cherry picked from commit 2bb972e9598d42758d7f1ab50c5e1d973c6fcd01)
This commit is contained in:
dab246
2023-05-10 16:57:05 +07:00
committed by Dat Vu
parent b62e26176e
commit 664d1825c0
4 changed files with 41 additions and 7 deletions
@@ -2,7 +2,7 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:jmap_dart_client/jmap/account_id.dart';
import 'package:jmap_dart_client/jmap/core/user_name.dart';
import 'package:jmap_dart_client/jmap/core/session/session.dart';
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
class GetNewReceiveEmailFromNotificationLoading extends UIState {}
@@ -11,12 +11,12 @@ class GetNewReceiveEmailFromNotificationSuccess extends UIState {
final List<EmailId> emailIds;
final AccountId accountId;
final UserName userName;
final Session? session;
GetNewReceiveEmailFromNotificationSuccess(this.accountId, this.userName, this.emailIds);
GetNewReceiveEmailFromNotificationSuccess(this.accountId, this.session, this.emailIds);
@override
List<Object> get props => [accountId, userName, emailIds];
List<Object?> get props => [accountId, session, emailIds];
}
class GetNewReceiveEmailFromNotificationFailure extends FeatureFailure {
@@ -32,7 +32,7 @@ class GetNewReceiveEmailFromNotificationInteractor {
accountId,
currentState);
yield Right<Failure, Success>(GetNewReceiveEmailFromNotificationSuccess(accountId, userName, listEmailIds));
yield Right<Failure, Success>(GetNewReceiveEmailFromNotificationSuccess(accountId, session, listEmailIds));
} else {
yield Left<Failure, Success>(GetNewReceiveEmailFromNotificationFailure(EmailStateNoChangeException()));
}