TF-4368 Add log to tracing refresh change emails on Sentry

This commit is contained in:
dab246
2026-03-12 11:15:03 +07:00
committed by Dat H. Pham
parent 80c368be62
commit cdc7d711f5
2 changed files with 36 additions and 5 deletions
@@ -375,9 +375,26 @@ class ThreadRepositoryImpl extends ThreadRepository {
mailboxId: emailFilter?.mailboxId,
propertiesCreated: propertiesCreated,
);
logTrace(
'ThreadRepositoryImpl::refreshChanges():'
'CountEmailCached = ${newEmailResponse.emailList?.length}, '
'EmailStateCache = ${newEmailResponse.state?.value}, '
'InMailboxId = ${emailFilter?.mailboxId?.asString}, '
'Limit = ${limit?.value.toInt()}, '
'DefaultLimit = ${ThreadConstants.defaultLimit.value.toInt()}, '
'CountEmailNetwork = ${networkEmailResponse.emailList?.length}, '
'EmailStateNetwork = ${networkEmailResponse.state?.value}, ',
);
yield networkEmailResponse.copyWith(emailChangeResponse: emailChangeResponse);
} else {
logTrace(
'ThreadRepositoryImpl::refreshChanges():'
'CountEmailCached = ${newEmailResponse.emailList?.length}, '
'EmailStateCache = ${newEmailResponse.state?.value}, '
'InMailboxId = ${emailFilter?.mailboxId?.asString}, '
'Limit = ${limit?.value.toInt()}, '
'DefaultLimit = ${ThreadConstants.defaultLimit.value.toInt()}, ',
);
yield newEmailResponse.copyWith(emailChangeResponse: emailChangeResponse);
}
}
@@ -477,8 +477,20 @@ class ThreadController extends BaseController with EmailActionController {
final totalHeightListEmails = currentListEmails.isEmpty
? 0
: currentListEmails.length * ThreadConstants.defaultMaxHeightEmailItemOnBrowser;
if (browserInnerHeight >= ThreadConstants.defaultMaxHeightBrowser &&
totalHeightListEmails <= browserInnerHeight) {
final isAutoLoadMore =
browserInnerHeight >= ThreadConstants.defaultMaxHeightBrowser &&
totalHeightListEmails <= browserInnerHeight;
logTrace(
'ThreadController::_validateBrowserHeight():'
'BrowserInnerHeight = $browserInnerHeight, '
'TotalHeightListEmails = $totalHeightListEmails, '
'ThreadConstants.defaultMaxHeightBrowser = ${ThreadConstants.defaultMaxHeightBrowser}, '
'ThreadConstants.defaultMaxHeightEmailItemOnBrowser = ${ThreadConstants.defaultMaxHeightEmailItemOnBrowser}, '
'CanLoadMore = $canLoadMore, '
'isAutoLoadMore = $isAutoLoadMore, '
'CountCurrentListEmails = ${currentListEmails.length}',
);
if (isAutoLoadMore) {
_performAutomaticallyLoadMoreEmails();
}
}
@@ -557,7 +569,9 @@ class ThreadController extends BaseController with EmailActionController {
}
void _handleOnDoneGetAllEmailFailure() {
canLoadMore = false;
if (PlatformInfo.isWeb) {
_validateBrowserHeight();
}
if (PlatformInfo.isWeb && mailboxDashBoardController.isEmailListDisplayed) {
refocusMailShortcutFocus();
}
@@ -630,7 +644,7 @@ class ThreadController extends BaseController with EmailActionController {
consumeState(Stream.value(Right(GetAllEmailLoading())));
}
canLoadMore = false;
canLoadMore = true;
loadingMoreStatus.value = LoadingMoreStatus.idle;
cancelSelectEmail();