Remove closeBox when open box in hive database
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -76,13 +76,11 @@ class NewEmailCacheManager {
|
||||
EmailId emailId
|
||||
) async {
|
||||
final keyCache = TupleKey(emailId.asString, accountId.asString, userName.value).encodeKey;
|
||||
final detailedEmailCache = await _cacheClient.getItem(keyCache, needToReopen: true);
|
||||
final detailedEmailCache = await _cacheClient.getItem(keyCache);
|
||||
if (detailedEmailCache != null) {
|
||||
return detailedEmailCache;
|
||||
} else {
|
||||
throw NotFoundStoredNewEmailException();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> closeNewEmailHiveCacheBox() => _cacheClient.closeBox();
|
||||
}
|
||||
@@ -74,7 +74,7 @@ class OpenedEmailCacheManager {
|
||||
EmailId emailId
|
||||
) async {
|
||||
final keyCache = TupleKey(emailId.asString, accountId.asString, userName.value).encodeKey;
|
||||
final detailedEmailCache = await _cacheClient.getItem(keyCache, needToReopen: true);
|
||||
final detailedEmailCache = await _cacheClient.getItem(keyCache);
|
||||
if (detailedEmailCache != null) {
|
||||
return detailedEmailCache;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user