TF-4368 Add more log trace for load more email
This commit is contained in:
@@ -410,6 +410,12 @@ class ThreadRepositoryImpl extends ThreadRepository {
|
|||||||
newDestroyed: response.notFoundEmailIds,
|
newDestroyed: response.notFoundEmailIds,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
logTrace(
|
||||||
|
'ThreadRepositoryImpl::loadMoreEmails(): emailList = ${response.emailList?.length},'
|
||||||
|
'notFoundEmailIds = ${response.notFoundEmailIds?.length}, '
|
||||||
|
'existNotFoundEmails = ${response.existNotFoundEmails}, '
|
||||||
|
'state = ${response.state?.value}',
|
||||||
|
);
|
||||||
yield response;
|
yield response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -834,7 +834,13 @@ class ThreadController extends BaseController with EmailActionController {
|
|||||||
final oldestEmail = mailboxDashBoardController.emailsInCurrentMailbox.isNotEmpty
|
final oldestEmail = mailboxDashBoardController.emailsInCurrentMailbox.isNotEmpty
|
||||||
? mailboxDashBoardController.emailsInCurrentMailbox.last
|
? mailboxDashBoardController.emailsInCurrentMailbox.last
|
||||||
: null;
|
: null;
|
||||||
log('ThreadController::_loadMoreEmails: OldestEmailID = ${oldestEmail?.id?.asString}');
|
final useCache = selectedMailbox?.isCacheable ?? false;
|
||||||
|
final filterOption = mailboxDashBoardController.filterMessageOption.value;
|
||||||
|
logTrace(
|
||||||
|
'ThreadController::_loadMoreEmails: OldestEmailID = ${oldestEmail?.id?.asString}, '
|
||||||
|
'useCache = $useCache, '
|
||||||
|
'filterOption = ${filterOption.name}',
|
||||||
|
);
|
||||||
consumeState(_loadMoreEmailsInMailboxInteractor.execute(
|
consumeState(_loadMoreEmailsInMailboxInteractor.execute(
|
||||||
GetEmailRequest(
|
GetEmailRequest(
|
||||||
_session!,
|
_session!,
|
||||||
@@ -876,7 +882,10 @@ class ThreadController extends BaseController with EmailActionController {
|
|||||||
canLoadMore = success.emailList.isNotEmpty;
|
canLoadMore = success.emailList.isNotEmpty;
|
||||||
loadingMoreStatus.value = LoadingMoreStatus.completed;
|
loadingMoreStatus.value = LoadingMoreStatus.completed;
|
||||||
final appendableList = validateListEmailsLoadMore(success.emailList);
|
final appendableList = validateListEmailsLoadMore(success.emailList);
|
||||||
log('ThreadController::_loadMoreEmailsSuccess: emailList = ${success.emailList.length} | appendableList = ${appendableList.length}');
|
logTrace(
|
||||||
|
'ThreadController::_loadMoreEmailsSuccess: emailList = ${success.emailList.length}, '
|
||||||
|
'appendableList = ${appendableList.length}',
|
||||||
|
);
|
||||||
if (appendableList.isNotEmpty) {
|
if (appendableList.isNotEmpty) {
|
||||||
mailboxDashBoardController.emailsInCurrentMailbox.addAll(appendableList);
|
mailboxDashBoardController.emailsInCurrentMailbox.addAll(appendableList);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user