TF-3345 Write unit test to verify SearchEmailFilter with before datetime
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -566,6 +566,15 @@ class ThreadController extends BaseController with EmailActionController {
|
||||
}
|
||||
}
|
||||
|
||||
@visibleForTesting
|
||||
EmailFilterCondition getFilterCondition({
|
||||
PresentationEmail? oldestEmail,
|
||||
MailboxId? mailboxIdSelected,
|
||||
}) => _getFilterCondition(
|
||||
oldestEmail: oldestEmail,
|
||||
mailboxIdSelected: mailboxIdSelected,
|
||||
);
|
||||
|
||||
EmailFilterCondition _getFilterCondition({PresentationEmail? oldestEmail, MailboxId? mailboxIdSelected}) {
|
||||
switch(mailboxDashBoardController.filterMessageOption.value) {
|
||||
case FilterMessageOption.all:
|
||||
@@ -656,6 +665,9 @@ class ThreadController extends BaseController with EmailActionController {
|
||||
}
|
||||
}
|
||||
|
||||
@visibleForTesting
|
||||
Future<void> refreshChangeSearchEmail() => _refreshChangeSearchEmail();
|
||||
|
||||
Future<void> _refreshChangeSearchEmail() async {
|
||||
await _refreshChangeListEmailCache();
|
||||
|
||||
@@ -938,6 +950,15 @@ class ThreadController extends BaseController with EmailActionController {
|
||||
searchController.clearTextSearch();
|
||||
}
|
||||
|
||||
@visibleForTesting
|
||||
void searchEmail({
|
||||
UnsignedInt? limit,
|
||||
bool needRefreshSearchState = false,
|
||||
}) => _searchEmail(
|
||||
limit: limit,
|
||||
needRefreshSearchState: needRefreshSearchState,
|
||||
);
|
||||
|
||||
void _searchEmail({UnsignedInt? limit, bool needRefreshSearchState = false}) {
|
||||
if (_session != null && _accountId != null) {
|
||||
if (!needRefreshSearchState && listEmailController.hasClients) {
|
||||
@@ -1018,6 +1039,9 @@ class ThreadController extends BaseController with EmailActionController {
|
||||
}
|
||||
}
|
||||
|
||||
@visibleForTesting
|
||||
void searchMoreEmails() => _searchMoreEmails();
|
||||
|
||||
void _searchMoreEmails() {
|
||||
log('ThreadController::_searchMoreEmails:');
|
||||
if (canSearchMore && _session != null && _accountId != null) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user