diff --git a/lib/features/thread/presentation/thread_controller.dart b/lib/features/thread/presentation/thread_controller.dart index 64478c460..e7549b3e4 100644 --- a/lib/features/thread/presentation/thread_controller.dart +++ b/lib/features/thread/presentation/thread_controller.dart @@ -800,7 +800,7 @@ class ThreadController extends BaseController with EmailActionController { filter: getFilterConditionForLoadMailbox(oldestEmail: oldestEmail), properties: EmailUtils.getPropertiesForEmailGetMethod(_session!, _accountId!), lastEmailId: oldestEmail?.id, - useCache: selectedMailbox?.isVirtualFolder != true, + useCache: selectedMailbox?.isCacheable ?? false, ) )); } @@ -822,13 +822,13 @@ class ThreadController extends BaseController with EmailActionController { } void _loadMoreEmailsSuccess(LoadMoreEmailsSuccess success) { - canLoadMore = success.emailList.isNotEmpty; loadingMoreStatus.value = LoadingMoreStatus.completed; final appendableList = validateListEmailsLoadMore(success.emailList); log('ThreadController::_loadMoreEmailsSuccess: emailList = ${success.emailList.length} | appendableList = ${appendableList.length}'); if (appendableList.isNotEmpty) { mailboxDashBoardController.emailsInCurrentMailbox.addAll(appendableList); } + canLoadMore = success.emailList.isNotEmpty && appendableList.isNotEmpty; if (PlatformInfo.isWeb) { _validateBrowserHeight(); }