TF-4227 Add integration test on mobile for case display_view_with_all_email_with_tag_scenario
This commit is contained in:
@@ -60,18 +60,30 @@ extension CreateEmailRequestExtension on CreateEmailRequest {
|
||||
Set<EmailBodyPart> createAttachments() => attachments?.toEmailBodyPart() ?? {};
|
||||
|
||||
Map<KeyWordIdentifier, bool>? createKeywords() {
|
||||
if (draftsMailboxId != null) {
|
||||
return {
|
||||
KeyWordIdentifier.emailDraft: true,
|
||||
KeyWordIdentifier.emailSeen: true,
|
||||
};
|
||||
} else if (templateMailboxId != null) {
|
||||
return {
|
||||
KeyWordIdentifier.emailSeen: true,
|
||||
};
|
||||
} else {
|
||||
if (draftsMailboxId == null &&
|
||||
templateMailboxId == null &&
|
||||
keywords == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final result = <KeyWordIdentifier, bool>{};
|
||||
|
||||
if (draftsMailboxId != null) {
|
||||
result.addAll({
|
||||
KeyWordIdentifier.emailDraft: true,
|
||||
KeyWordIdentifier.emailSeen: true,
|
||||
});
|
||||
} else if (templateMailboxId != null) {
|
||||
result[KeyWordIdentifier.emailSeen] = true;
|
||||
}
|
||||
|
||||
if (keywords != null) {
|
||||
for (final keyword in keywords!) {
|
||||
result[keyword] = true;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Map<MailboxId, bool>? createMailboxIds() {
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:jmap_dart_client/jmap/core/session/session.dart';
|
||||
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/email/keyword_identifier.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
import 'package:model/email/attachment.dart';
|
||||
import 'package:model/email/email_action_type.dart';
|
||||
@@ -47,6 +48,7 @@ class CreateEmailRequest with EquatableMixin {
|
||||
final int? savedDraftHash;
|
||||
final EmailActionType? savedActionType;
|
||||
final EmailId? savedEmailDraftId;
|
||||
final List<KeyWordIdentifier>? keywords;
|
||||
|
||||
CreateEmailRequest({
|
||||
required this.session,
|
||||
@@ -83,6 +85,7 @@ class CreateEmailRequest with EquatableMixin {
|
||||
this.savedDraftHash,
|
||||
this.savedActionType,
|
||||
this.savedEmailDraftId,
|
||||
this.keywords,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -121,5 +124,6 @@ class CreateEmailRequest with EquatableMixin {
|
||||
savedDraftHash,
|
||||
savedActionType,
|
||||
savedEmailDraftId,
|
||||
keywords,
|
||||
];
|
||||
}
|
||||
@@ -162,7 +162,7 @@ extension PresentationMailboxExtension on PresentationMailbox {
|
||||
if (isFavorite) {
|
||||
return KeyWordIdentifier.emailFlagged.value;
|
||||
}
|
||||
if (this is PresentationLabelMailbox) {
|
||||
if (isLabelMailbox) {
|
||||
return (this as PresentationLabelMailbox).label.keyword?.value;
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user