TF-2713 Small evolution for printing
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:core/domain/extensions/datetime_extension.dart';
|
||||
import 'package:core/utils/app_logger.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/properties/properties.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
|
||||
@@ -44,6 +45,17 @@ extension EmailExtension on Email {
|
||||
mailboxCurrent?.isSent == false;
|
||||
}
|
||||
|
||||
String getReceivedAt({required String newLocale, String? pattern}) {
|
||||
log('EmailExtension::getReceivedAt: newLocale = $newLocale | pattern = $pattern');
|
||||
if (receivedAt != null) {
|
||||
return receivedAt!.formatDateToLocal(
|
||||
pattern: pattern ?? receivedAt!.value.toLocal().toPattern(),
|
||||
locale: newLocale
|
||||
);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
Set<String> getRecipientEmailAddressList() {
|
||||
final listEmailAddress = <String>{};
|
||||
final listToAddress = to.getListAddress() ?? [];
|
||||
|
||||
Reference in New Issue
Block a user