TF-3643 Thread Detail get emails meta data method
TF-3643 Thread Detail cache email with thread id TF-3643 Thread Detail view thread detail TF-3643 Thread Detail [Part 2 fixup] remove ThreadDetailController dependency from MailboxDashboardController TF-3643 Thread Detail [Part 2 fixup] remove EmailSupervisorController dependency from ThreadDetailController TF-3643 Thread Detail [Part 2 fixup] move isSearchRunning check into ThreadDetailController TF-3643 Thread Detail [Part 2 fixup] ensure GetEmailsByIdsInteractor performance TF-3643 Thread Detail [Part 2 fixup] unit test loadMoreThreadDetailEmails TF-3643 Thread Detail [Part 2 fixup] unit test getEmailIdsToLoad TF-3643 Thread Detail [Part 2 fixup] optimize ThreadDetailBinding bindingsDataSource TF-3643 Thread Detail [Part 2 fixup] optimize getThreadDetailLoadingView TF-3643 Thread Detail [Part 2 fixup] readd unique ValueKey for HtmlContentViewerOnWebWidget TF-3643 Thread Detail [Part 2 fixup] unit test initializeThreadDetailEmails TF-3643 Thread Detail [Part 3 fixup] Update private action button methods TF-3643 Thread Detail [Part 4 fixup] Collapsed email preview 65 characters max TF-3643 Thread Detail [Part 4 fixup] Remove personal scripts TF-3643 Thread Detail move EmailInThreadStatus into PresentationEmail TF-3643 Thread Detail refactor toggle collapse expand TF-3643 Thread Detail EmailViewAppBarWidget required parameters TF-3643 Thread Detail tap avatar toggle expansion TF-3643 Thread Detail fix cannot open single email TF-3643 Thread Detail fix open thread first time blank view TF-3643 Thread Detail fix thread detail UI TF-3643 Thread Detail fix round bottom view TF-3643 Thread Detail fix round bottom view TF-3643 Thread Detail bottom actions depend on current expanded email TF-3643 Thread Detail hide next previous actions TF-3643 Thread Detail fix load more show initial loading view TF-3643 Thread Detail fix cannot view single email TF-3643 Thread Detail fix bottom place holder not aligned TF-3643 Thread Detail fix back to search view TF-3643 Thread Detail fix display 65 character preview collapsed email TF-3643 Thread Detail fix search not work TF-3643 Thread Detail fix bottom place holder UI TF-3643 Thread Detail fix expand view TF-3643 Thread Detail jump to top of last email view TF-3643 Thread Detail remove toMe condition of filtering thread TF-3643 Thread Detail fix sort thread detail TF-3643 Thread Detail fix assert not work in release TF-3643 Thread Detail add load more test case <20 TF-3643 Thread Detail remove the use of currentThreadId TF-3643 Thread Detail remove the use of selectedEmail in SingleEmailController TF-3643 Thread Detail fix unit test SingleEmailController calendar TF-3643 Thread Detail disable 2 way scroll control TF-3643 Thread Detail allow thread to load sent email incase thread only contains 1 email TF-3643 Thread Detail disable single email page view TF-3643 Thread Detail update emailsNotLoadedCount name TF-3643 Thread Detail remove collapsed email char limit TF-3643 Thread Detail fix CI TF-3643 Thread Detail unit test handleGetEmailIdsByThreadIdSuccess TF-3643 Thread Detail make _currentEmailId private TF-3643 Thread Detail fix search click users TF-3643 Thread Detail fix scroll jump TF-3643 Thread Detail fix scroll jump TF-3643 Thread Detail fix web back action TF-3643 Thread Detail round bottom actions TF-3643 Thread Detail fix tablet large empty email TF-3643 Thread Detail fix email subject selectable TF-3643 Thread Detail fix email single view with top divider TF-3643 Thread Detail fix email cache threadId missing TF-3643 Thread Detail fix filter sent email in thread details TF-3643 Thread Detail fix select text TF-3643 Thread Detail fix subject alignment TF-3643 Thread Detail fix subject alignment TF-3643 Thread Detail fix tablet large empty email TF-3643 Thread Detail add nullcheck for _jumpScrollViewToTopOfEmail TF-3643 Thread Detail decouple ThreadDetailController from SingleEmailController TF-3643 Thread Detail combine emailIds to emailIdsPresentation TF-3643 Thread Detail remove currentEmailLoaded obx listener of SingleEmailController TF-3643 Thread Detail replace threadAction with an email ui action TF-3643 Thread Detail fix top and bottom bar delay displaying TF-3643 Thread Detail update ReplyForwardBottomBarAction to PerformEmailActionInThreadDetailAction TF-3643 Thread Detail use getOwnEmailAddress in ThreadDetailAppBar TF-3643 Thread Detail add TextOverflow.ellipsis to EmailSubjectWidget TF-3643 Thread Detail fix round border threadDetailLoadingView
This commit is contained in:
@@ -0,0 +1 @@
|
||||
enum EmailInThreadStatus { collapsed, expanded }
|
||||
@@ -15,6 +15,7 @@ class EmailProperty {
|
||||
static const String bcc = 'bcc';
|
||||
static const String replyTo = 'replyTo';
|
||||
static const String mailboxIds = 'mailboxIds';
|
||||
static const String threadId = 'threadId';
|
||||
static const String bodyValues = 'bodyValues';
|
||||
static const String htmlBody = 'htmlBody';
|
||||
static const String attachments = 'attachments';
|
||||
|
||||
@@ -13,6 +13,7 @@ import 'package:jmap_dart_client/jmap/mail/email/individual_header_identifier.da
|
||||
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/email_content.dart';
|
||||
import 'package:model/email/email_in_thread_status.dart';
|
||||
import 'package:model/email/mail_priority_header.dart';
|
||||
import 'package:model/extensions/email_address_extension.dart';
|
||||
import 'package:model/extensions/keyword_identifier_extension.dart';
|
||||
@@ -38,6 +39,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
|
||||
final Set<EmailAddress>? bcc;
|
||||
final Set<EmailAddress>? replyTo;
|
||||
final Map<MailboxId, bool>? mailboxIds;
|
||||
final ThreadId? threadId;
|
||||
final SelectMode selectMode;
|
||||
final Uri? routeWeb;
|
||||
final PresentationMailbox? mailboxContain;
|
||||
@@ -48,6 +50,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
|
||||
final Map<IndividualHeaderIdentifier, String?>? xPriorityHeader;
|
||||
final Map<IndividualHeaderIdentifier, String?>? importanceHeader;
|
||||
final Map<IndividualHeaderIdentifier, String?>? priorityHeader;
|
||||
final EmailInThreadStatus? emailInThreadStatus;
|
||||
|
||||
PresentationEmail({
|
||||
this.id,
|
||||
@@ -65,6 +68,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
|
||||
this.bcc,
|
||||
this.replyTo,
|
||||
this.mailboxIds,
|
||||
this.threadId,
|
||||
this.selectMode = SelectMode.INACTIVE,
|
||||
this.routeWeb,
|
||||
this.mailboxContain,
|
||||
@@ -75,6 +79,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
|
||||
this.xPriorityHeader,
|
||||
this.importanceHeader,
|
||||
this.priorityHeader,
|
||||
this.emailInThreadStatus,
|
||||
});
|
||||
|
||||
String getSenderName() {
|
||||
@@ -183,6 +188,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
|
||||
bcc,
|
||||
replyTo,
|
||||
mailboxIds,
|
||||
threadId,
|
||||
selectMode,
|
||||
routeWeb,
|
||||
mailboxContain,
|
||||
@@ -195,6 +201,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
|
||||
xPriorityHeader,
|
||||
importanceHeader,
|
||||
priorityHeader,
|
||||
emailInThreadStatus,
|
||||
];
|
||||
|
||||
PresentationEmail copyWith({
|
||||
@@ -213,6 +220,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
|
||||
Set<EmailAddress>? bcc,
|
||||
Set<EmailAddress>? replyTo,
|
||||
Map<MailboxId, bool>? mailboxIds,
|
||||
ThreadId? threadId,
|
||||
SelectMode? selectMode,
|
||||
Uri? routeWeb,
|
||||
PresentationMailbox? mailboxContain,
|
||||
@@ -223,6 +231,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
|
||||
Map<IndividualHeaderIdentifier, String?>? xPriorityHeader,
|
||||
Map<IndividualHeaderIdentifier, String?>? importanceHeader,
|
||||
Map<IndividualHeaderIdentifier, String?>? priorityHeader,
|
||||
EmailInThreadStatus? emailInThreadStatus,
|
||||
}) {
|
||||
return PresentationEmail(
|
||||
id: id ?? this.id,
|
||||
@@ -240,6 +249,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
|
||||
bcc: bcc ?? this.bcc,
|
||||
replyTo: replyTo ?? this.replyTo,
|
||||
mailboxIds: mailboxIds ?? this.mailboxIds,
|
||||
threadId: threadId ?? this.threadId,
|
||||
selectMode: selectMode ?? this.selectMode,
|
||||
routeWeb: routeWeb ?? this.routeWeb,
|
||||
mailboxContain: mailboxContain ?? this.mailboxContain,
|
||||
@@ -250,6 +260,7 @@ class PresentationEmail with EquatableMixin, SearchSnippetMixin {
|
||||
xPriorityHeader: xPriorityHeader ?? this.xPriorityHeader,
|
||||
importanceHeader: importanceHeader ?? this.importanceHeader,
|
||||
priorityHeader: priorityHeader ?? this.priorityHeader,
|
||||
emailInThreadStatus: emailInThreadStatus ?? this.emailInThreadStatus,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -116,6 +116,7 @@ extension EmailExtension on Email {
|
||||
bcc: bcc,
|
||||
replyTo: replyTo,
|
||||
mailboxIds: mailboxIds,
|
||||
threadId: threadId,
|
||||
selectMode: selectMode,
|
||||
emailHeader: headers?.toList(),
|
||||
bodyValues: bodyValues,
|
||||
@@ -146,6 +147,7 @@ extension EmailExtension on Email {
|
||||
bcc: updatedProperties.contain(EmailProperty.bcc) ? newEmail.bcc : bcc,
|
||||
replyTo: updatedProperties.contain(EmailProperty.replyTo) ? newEmail.replyTo : replyTo,
|
||||
mailboxIds: updatedProperties.contain(EmailProperty.mailboxIds) ? newEmail.mailboxIds : mailboxIds,
|
||||
threadId: updatedProperties.contain(EmailProperty.threadId) ? newEmail.threadId : threadId,
|
||||
headerCalendarEvent: updatedProperties.contain(IndividualHeaderIdentifier.headerCalendarEvent.value) ? newEmail.headerCalendarEvent : headerCalendarEvent,
|
||||
xPriorityHeader: updatedProperties.contain(IndividualHeaderIdentifier.xPriorityHeader.value)
|
||||
? newEmail.xPriorityHeader
|
||||
|
||||
@@ -34,4 +34,8 @@ extension ListEmailExtension on List<Email> {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<Email> sortWithResult(Comparator comparator) {
|
||||
return List.from(this..sortBy(comparator));
|
||||
}
|
||||
}
|
||||
@@ -8,10 +8,12 @@ import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/capability/calendar_event_capability.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/capability/capability_identifier.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/capability/capability_properties.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/capability/core_capability.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/capability/default_capability.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/capability/empty_capability.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/id.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/session/session.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/unsigned_int.dart';
|
||||
import 'package:model/error_type_handler/account_exception.dart';
|
||||
import 'package:model/error_type_handler/unknown_address_exception.dart';
|
||||
import 'package:model/error_type_handler/unknown_uri_exception.dart';
|
||||
@@ -181,4 +183,16 @@ extension SessionExtension on Session {
|
||||
return supportedLanguages.firstOrNull;
|
||||
}
|
||||
}
|
||||
|
||||
UnsignedInt? getMaxObjectsInGet(AccountId accountId) {
|
||||
try {
|
||||
return getCapabilityProperties<CoreCapability>(
|
||||
accountId,
|
||||
CapabilityIdentifier.jmapCore
|
||||
)?.maxObjectsInGet;
|
||||
} catch (e) {
|
||||
logError('SessionExtensions::getMaxObjectsInGet():Exception: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user