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;
|
break;
|
||||||
case EmailSortOrderType.relevance:
|
case EmailSortOrderType.relevance:
|
||||||
break;
|
break;
|
||||||
|
case EmailSortOrderType.sizeAscending:
|
||||||
|
break;
|
||||||
|
case EmailSortOrderType.sizeDescending:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+21
-1
@@ -12,7 +12,9 @@ enum EmailSortOrderType {
|
|||||||
senderAscending,
|
senderAscending,
|
||||||
senderDescending,
|
senderDescending,
|
||||||
subjectAscending,
|
subjectAscending,
|
||||||
subjectDescending;
|
subjectDescending,
|
||||||
|
sizeAscending,
|
||||||
|
sizeDescending;
|
||||||
|
|
||||||
String getTitle(BuildContext context) {
|
String getTitle(BuildContext context) {
|
||||||
return getTitleByAppLocalizations(AppLocalizations.of(context));
|
return getTitleByAppLocalizations(AppLocalizations.of(context));
|
||||||
@@ -34,6 +36,10 @@ enum EmailSortOrderType {
|
|||||||
return appLocalizations.subjectAscending;
|
return appLocalizations.subjectAscending;
|
||||||
case EmailSortOrderType.subjectDescending:
|
case EmailSortOrderType.subjectDescending:
|
||||||
return appLocalizations.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)
|
..add(EmailComparator(EmailComparatorProperty.subject)
|
||||||
..setIsAscending(false))
|
..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.subjectAscending ||
|
||||||
this == EmailSortOrderType.senderDescending ||
|
this == EmailSortOrderType.senderDescending ||
|
||||||
this == EmailSortOrderType.senderAscending ||
|
this == EmailSortOrderType.senderAscending ||
|
||||||
|
this == EmailSortOrderType.sizeDescending ||
|
||||||
|
this == EmailSortOrderType.sizeAscending ||
|
||||||
this == EmailSortOrderType.relevance;
|
this == EmailSortOrderType.relevance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4297,5 +4297,17 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders_order": [],
|
"placeholders_order": [],
|
||||||
"placeholders": {}
|
"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',
|
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