TF-2717 Get identity when open app, if not get identity, get whenever open composer
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import 'package:jmap_dart_client/jmap/identities/identity.dart';
|
||||
import 'package:tmail_ui_user/features/email/presentation/model/composer_arguments.dart';
|
||||
|
||||
extension ComposerArgumentsExtension on ComposerArguments {
|
||||
|
||||
ComposerArguments withIdentity({List<Identity>? identities}) {
|
||||
return ComposerArguments(
|
||||
emailActionType: emailActionType,
|
||||
presentationEmail: presentationEmail,
|
||||
emailContents: emailContents,
|
||||
attachments: attachments,
|
||||
mailboxRole: mailboxRole,
|
||||
listEmailAddress: listEmailAddress,
|
||||
listSharedMediaFile: listSharedMediaFile,
|
||||
sendingEmail: sendingEmail,
|
||||
subject: subject,
|
||||
body: body,
|
||||
messageId: messageId,
|
||||
references: references,
|
||||
previousEmailId: previousEmailId,
|
||||
identities: identities,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:jmap_dart_client/jmap/identities/identity.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email_address.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
@@ -22,6 +23,7 @@ class ComposerArguments extends RouterArguments {
|
||||
final MessageIdsHeaderValue? messageId;
|
||||
final MessageIdsHeaderValue? references;
|
||||
final EmailId? previousEmailId;
|
||||
final List<Identity>? identities;
|
||||
|
||||
ComposerArguments({
|
||||
this.emailActionType = EmailActionType.compose,
|
||||
@@ -37,6 +39,7 @@ class ComposerArguments extends RouterArguments {
|
||||
this.messageId,
|
||||
this.references,
|
||||
this.previousEmailId,
|
||||
this.identities,
|
||||
});
|
||||
|
||||
factory ComposerArguments.fromSendingEmail(SendingEmail sendingEmail) =>
|
||||
@@ -170,5 +173,6 @@ class ComposerArguments extends RouterArguments {
|
||||
body,
|
||||
messageId,
|
||||
references,
|
||||
identities,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user