TF-1010 Synchronize the cache every when the state available
This commit is contained in:
committed by
Dat H. Pham
parent
4579199f6d
commit
3f51b2ea83
@@ -78,8 +78,11 @@ class ThreadRepositoryImpl extends ThreadRepository {
|
||||
yield localEmailResponse;
|
||||
}
|
||||
|
||||
if (localEmailResponse.hasState() && networkEmailResponse == null) {
|
||||
if (localEmailResponse.hasState()) {
|
||||
log('ThreadRepositoryImpl::getAllEmail(): filter = ${emailFilter?.mailboxId} local has state: ${localEmailResponse.state}');
|
||||
if (networkEmailResponse != null) {
|
||||
await _updateEmailCache(newCreated: networkEmailResponse.emailList);
|
||||
}
|
||||
await _synchronizeCacheWithChanges(
|
||||
accountId,
|
||||
localEmailResponse.state!,
|
||||
|
||||
Reference in New Issue
Block a user