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;
|
yield localEmailResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localEmailResponse.hasState() && networkEmailResponse == null) {
|
if (localEmailResponse.hasState()) {
|
||||||
log('ThreadRepositoryImpl::getAllEmail(): filter = ${emailFilter?.mailboxId} local has state: ${localEmailResponse.state}');
|
log('ThreadRepositoryImpl::getAllEmail(): filter = ${emailFilter?.mailboxId} local has state: ${localEmailResponse.state}');
|
||||||
|
if (networkEmailResponse != null) {
|
||||||
|
await _updateEmailCache(newCreated: networkEmailResponse.emailList);
|
||||||
|
}
|
||||||
await _synchronizeCacheWithChanges(
|
await _synchronizeCacheWithChanges(
|
||||||
accountId,
|
accountId,
|
||||||
localEmailResponse.state!,
|
localEmailResponse.state!,
|
||||||
|
|||||||
Reference in New Issue
Block a user