TF-928 Fix force logout when reload web

This commit is contained in:
dab246
2022-09-08 13:01:19 +07:00
committed by Dat H. Pham
parent 0838530775
commit aab8967c27
6 changed files with 26 additions and 27 deletions
@@ -98,7 +98,11 @@ class EncryptionKeyCacheClient extends HiveCacheClient<EncryptionKeyCache> {
@override
Future<Box<EncryptionKeyCache>> openBox() async {
return Hive.openBox<EncryptionKeyCache>(tableName);
if (Hive.isBoxOpen(tableName)) {
return Hive.box<EncryptionKeyCache>(tableName);
} else {
return Hive.openBox<EncryptionKeyCache>(tableName);
}
}
@override