TF-2536 Change the logic to get all mailbox
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -60,7 +60,8 @@ class NewEmailCacheManager {
|
||||
}
|
||||
|
||||
Future<List<DetailedEmailHiveCache>> getAllDetailedEmails(AccountId accountId, UserName userName) async {
|
||||
final detailedEmailCacheList = await _cacheClient.getListByTupleKey(accountId.asString, userName.value);
|
||||
final nestedKey = TupleKey(accountId.asString, userName.value).encodeKey;
|
||||
final detailedEmailCacheList = await _cacheClient.getListByNestedKey(nestedKey);
|
||||
detailedEmailCacheList.sortByLatestTime();
|
||||
return detailedEmailCacheList;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ class OpenedEmailCacheManager {
|
||||
}
|
||||
|
||||
Future<List<DetailedEmailHiveCache>> getAllDetailedEmails(AccountId accountId, UserName userName) async {
|
||||
final detailedEmailCacheList = await _cacheClient.getListByTupleKey(accountId.asString, userName.value);
|
||||
final nestedKey = TupleKey(accountId.asString, userName.value).encodeKey;
|
||||
final detailedEmailCacheList = await _cacheClient.getListByNestedKey(nestedKey);
|
||||
detailedEmailCacheList.sortByLatestTime();
|
||||
log('OpenedEmailCacheManager::getAllDetailedEmails():SIZE: ${detailedEmailCacheList.length}');
|
||||
return detailedEmailCacheList;
|
||||
|
||||
@@ -30,7 +30,8 @@ class SendingEmailCacheManager {
|
||||
}
|
||||
|
||||
Future<List<SendingEmailHiveCache>> getAllSendingEmailsByTupleKey(AccountId accountId, UserName userName) async {
|
||||
final sendingEmailsCache = await _hiveCacheClient.getListByTupleKey(accountId.asString, userName.value);
|
||||
final nestedKey = TupleKey(accountId.asString, userName.value).encodeKey;
|
||||
final sendingEmailsCache = await _hiveCacheClient.getListByNestedKey(nestedKey);
|
||||
sendingEmailsCache.sortByLatestTime();
|
||||
return sendingEmailsCache;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user