TF-174 Order the ThreadView base on ReceivedAt to uniform with load more
This commit is contained in:
committed by
Dat H. Pham
parent
630758e11a
commit
d8dd5ea31b
+1
-1
@@ -68,7 +68,7 @@ class SenderAndReceiverInformationTileBuilder {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 6),
|
padding: EdgeInsets.only(top: 6),
|
||||||
child: Text(
|
child: Text(
|
||||||
'${_presentationEmail!.getEmailDateTime(Localizations.localeOf(_context).toLanguageTag(), pattern: 'dd/MM/yyyy h:mm a')}',
|
'${_presentationEmail!.getReceivedAt(Localizations.localeOf(_context).toLanguageTag(), pattern: 'dd/MM/yyyy h:mm a')}',
|
||||||
style: TextStyle(fontSize: 12, color: AppColor.baseTextColor),
|
style: TextStyle(fontSize: 12, color: AppColor.baseTextColor),
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class ThreadController extends BaseController {
|
|||||||
inMailbox: mailboxDashBoardController.selectedMailbox.value?.id);
|
inMailbox: mailboxDashBoardController.selectedMailbox.value?.id);
|
||||||
|
|
||||||
Set<Comparator>? get _sortOrder => Set()
|
Set<Comparator>? get _sortOrder => Set()
|
||||||
..add(EmailComparator(EmailComparatorProperty.sentAt)
|
..add(EmailComparator(EmailComparatorProperty.receivedAt)
|
||||||
..setIsAscending(false));
|
..setIsAscending(false));
|
||||||
|
|
||||||
AccountId? get _accountId => mailboxDashBoardController.accountId.value;
|
AccountId? get _accountId => mailboxDashBoardController.accountId.value;
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class EmailTileBuilder {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(right: 4),
|
padding: EdgeInsets.only(right: 4),
|
||||||
child: Text(
|
child: Text(
|
||||||
'${_presentationEmail.getEmailDateTime(Localizations.localeOf(_context).toLanguageTag())}',
|
'${_presentationEmail.getReceivedAt(Localizations.localeOf(_context).toLanguageTag())}',
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow:TextOverflow.ellipsis,
|
overflow:TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ extension PresentationEmailExtension on PresentationEmail {
|
|||||||
|
|
||||||
int numberOfAllEmailAddress() => to.numberEmailAddress() + cc.numberEmailAddress() + bcc.numberEmailAddress();
|
int numberOfAllEmailAddress() => to.numberEmailAddress() + cc.numberEmailAddress() + bcc.numberEmailAddress();
|
||||||
|
|
||||||
String getEmailDateTime(String newLocale, {String? pattern}) {
|
String getReceivedAt(String newLocale, {String? pattern}) {
|
||||||
final emailTime = sentAt ?? receivedAt;
|
final emailTime = receivedAt;
|
||||||
if (emailTime != null) {
|
if (emailTime != null) {
|
||||||
return emailTime.formatDate(
|
return emailTime.formatDate(
|
||||||
pattern: pattern ?? emailTime.value.toLocal().toPattern(),
|
pattern: pattern ?? emailTime.value.toLocal().toPattern(),
|
||||||
|
|||||||
Reference in New Issue
Block a user