TF-1865: Update sending email has been edited

(cherry picked from commit 1099d39a31ef0fa590f082a7c146734c819b1707)
This commit is contained in:
HuyNguyen
2023-06-06 01:29:06 +07:00
committed by Dat Vu
parent 5a394e1719
commit 6f3af9100d
5 changed files with 26 additions and 8 deletions
@@ -106,8 +106,11 @@ abstract class HiveCacheClient<T> {
return tupleKey.parts.length >= 3 && tupleKey.parts[1] == accountId && tupleKey.parts[2] == userName;
}
Future<void> updateItem(String key, T newObject) {
Future<void> updateItem(String key, T newObject, {bool needToReopen = false}) {
return Future.sync(() async {
if (needToReopen) {
await closeBox();
}
final boxItem = encryption
? await openBoxEncryption()
: await openBox();