Remove closeBox when open box in hive database

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-05-30 10:08:02 +07:00
committed by Dat H. Pham
parent 19cede1a5f
commit 02c2e08e40
12 changed files with 11 additions and 45 deletions
@@ -23,7 +23,7 @@ class FCMCacheManager {
Future<jmap.State> getStateToRefresh(AccountId accountId, UserName userName, TypeName typeName) async {
final stateKeyCache = TupleKey(typeName.value, accountId.asString, userName.value).encodeKey;
final stateValue = await _fcmCacheClient.getItem(stateKeyCache, needToReopen: true);
final stateValue = await _fcmCacheClient.getItem(stateKeyCache);
if (stateValue != null) {
return jmap.State(stateValue);
} else {
@@ -52,7 +52,7 @@ class FCMCacheManager {
}
Future<FirebaseRegistrationCache> getStoredFirebaseRegistration() async {
final firebaseRegistration = await _firebaseRegistrationCacheClient.getItem(FirebaseRegistrationCache.keyCacheValue, needToReopen: true);
final firebaseRegistration = await _firebaseRegistrationCacheClient.getItem(FirebaseRegistrationCache.keyCacheValue);
if (firebaseRegistration == null) {
throw NotFoundFirebaseRegistrationCacheException();
} else {