TF-1913 Fix thread view keeps reloading

(cherry picked from commit fc7ecd17f685b82bac98d808af450000e0f02c47)
This commit is contained in:
dab246
2023-06-19 12:07:33 +07:00
committed by Dat H. Pham
parent 68145165be
commit 64ad8ea049
4 changed files with 25 additions and 15 deletions
@@ -343,7 +343,11 @@ class ThreadController extends BaseController with EmailActionController {
void _handleErrorGetAllOrRefreshChangesEmail(Object error, StackTrace stackTrace) async {
logError('ThreadController::_handleErrorGetAllOrRefreshChangesEmail():Error: $error');
if (error is CannotCalculateChangesMethodResponseException) {
await cachingManager.clearEmailCache();
if (_accountId != null && _session != null) {
await cachingManager.clearEmailCacheAndStateCacheByTupleKey(_accountId!, _session!);
} else {
await cachingManager.clearEmailCacheAndAllStateCache();
}
_getAllEmailAction();
}
}