fix: Correctly clear database if it is corrupted

onboarding
Krille Fear 4 years ago
parent 8308a365f5
commit 50991cac24

@ -91,7 +91,7 @@ class FlutterMatrixHiveStore extends FamedlySdkHiveDatabase {
await db.open();
} catch (e, s) {
Logs().e('Unable to open Hive. Delete and try again...', e, s);
await Hive.deleteFromDisk();
await db.clear(client.id);
await db.open();
}
Logs().i('Hive database is ready!');

Loading…
Cancel
Save