From e52072649594896012f797805848f985d355b3ec Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 26 Jul 2023 14:50:38 -0600 Subject: [PATCH] fix the fix --- lib/db/hive/db.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/db/hive/db.dart b/lib/db/hive/db.dart index 9d3f73abd..2fb82c806 100644 --- a/lib/db/hive/db.dart +++ b/lib/db/hive/db.dart @@ -276,10 +276,7 @@ class DB { Future deleteAll({required String boxName}) async { await mutex.protect(() async { - Box box = Hive.box(boxName); - if (!box.isOpen) { - box = await Hive.openBox(boxName); - } + final box = await Hive.openBox(boxName); await box.clear(); }); }