fix: Correctly clear database if it is corrupted

This commit is contained in:
Krille Fear 2021-09-14 14:55:27 +02:00
parent 5d218fb2e4
commit cbb40b6fdb
1 changed files with 1 additions and 1 deletions

View File

@ -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!');