TF-3461 Add sort by message size
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -76,6 +76,10 @@ class SearchEmailWithSortOrderScenario extends BaseTestScenario {
|
||||
break;
|
||||
case EmailSortOrderType.relevance:
|
||||
break;
|
||||
case EmailSortOrderType.sizeAscending:
|
||||
break;
|
||||
case EmailSortOrderType.sizeDescending:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+21
-1
@@ -12,7 +12,9 @@ enum EmailSortOrderType {
|
||||
senderAscending,
|
||||
senderDescending,
|
||||
subjectAscending,
|
||||
subjectDescending;
|
||||
subjectDescending,
|
||||
sizeAscending,
|
||||
sizeDescending;
|
||||
|
||||
String getTitle(BuildContext context) {
|
||||
return getTitleByAppLocalizations(AppLocalizations.of(context));
|
||||
@@ -34,6 +36,10 @@ enum EmailSortOrderType {
|
||||
return appLocalizations.subjectAscending;
|
||||
case EmailSortOrderType.subjectDescending:
|
||||
return appLocalizations.subjectDescending;
|
||||
case EmailSortOrderType.sizeAscending:
|
||||
return appLocalizations.sizeAscending;
|
||||
case EmailSortOrderType.sizeDescending:
|
||||
return appLocalizations.sizeDescending;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +83,18 @@ enum EmailSortOrderType {
|
||||
..add(EmailComparator(EmailComparatorProperty.subject)
|
||||
..setIsAscending(false))
|
||||
);
|
||||
case EmailSortOrderType.sizeAscending:
|
||||
return Some(
|
||||
<Comparator>{}
|
||||
..add(EmailComparator(EmailComparatorProperty.size)
|
||||
..setIsAscending(true))
|
||||
);
|
||||
case EmailSortOrderType.sizeDescending:
|
||||
return Some(
|
||||
<Comparator>{}
|
||||
..add(EmailComparator(EmailComparatorProperty.size)
|
||||
..setIsAscending(false))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +111,8 @@ enum EmailSortOrderType {
|
||||
this == EmailSortOrderType.subjectAscending ||
|
||||
this == EmailSortOrderType.senderDescending ||
|
||||
this == EmailSortOrderType.senderAscending ||
|
||||
this == EmailSortOrderType.sizeDescending ||
|
||||
this == EmailSortOrderType.sizeAscending ||
|
||||
this == EmailSortOrderType.relevance;
|
||||
}
|
||||
}
|
||||
@@ -4297,5 +4297,17 @@
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
},
|
||||
"sizeDescending": "Size: Big - Small",
|
||||
"@sizeDescending": {
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
},
|
||||
"sizeAscending": "Size: Small - Big",
|
||||
"@sizeAscending": {
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
}
|
||||
}
|
||||
@@ -4506,4 +4506,18 @@ class AppLocalizations {
|
||||
name: 'downloadAttachmentHasBeenCancelled',
|
||||
);
|
||||
}
|
||||
|
||||
String get sizeDescending {
|
||||
return Intl.message(
|
||||
'Size: Big - Small',
|
||||
name: 'sizeDescending',
|
||||
);
|
||||
}
|
||||
|
||||
String get sizeAscending {
|
||||
return Intl.message(
|
||||
'Size: Small - Big',
|
||||
name: 'sizeAscending',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user