TF-1900 Auto sync Sending Queue after work manager completed

(cherry picked from commit e68a8fdc49c600224b93e25f60ed6b8ecf1afe84)
This commit is contained in:
dab246
2023-06-04 12:21:27 +07:00
committed by Dat Vu
parent 38bd86019e
commit b2f96c8142
11 changed files with 92 additions and 20 deletions
@@ -24,8 +24,15 @@ class SendingEmailCacheManager {
return _hiveCacheClient.insertItem(keyCache, sendingEmailHiveCache);
}
Future<List<SendingEmailHiveCache>> getAllSendingEmails(AccountId accountId, UserName userName) async {
final sendingEmailsCache = await _hiveCacheClient.getListByTupleKey(accountId.asString, userName.value);
Future<List<SendingEmailHiveCache>> getAllSendingEmails(
AccountId accountId,
UserName userName,
{bool needToReopen = false}
) async {
final sendingEmailsCache = await _hiveCacheClient.getListByTupleKey(
accountId.asString,
userName.value,
needToReopen: needToReopen);
log('SendingEmailCacheManager::getAllSendingEmails():COUNT: ${sendingEmailsCache.length}');
sendingEmailsCache.sortByLatestTime();
return sendingEmailsCache;