fix the fix

This commit is contained in:
julian 2023-07-26 14:50:38 -06:00
parent 80dad5156a
commit e520726495

View file

@ -276,10 +276,7 @@ class DB {
Future<void> deleteAll<T>({required String boxName}) async {
await mutex.protect(() async {
Box<T> box = Hive.box<T>(boxName);
if (!box.isOpen) {
box = await Hive.openBox(boxName);
}
final box = await Hive.openBox<T>(boxName);
await box.clear();
});
}