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(); }); }