mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-04-29 14:07:55 +02:00
chore: Change Hive database path
This commit is contained in:
parent
a6f1d00daf
commit
4d65cb8f43
@ -62,14 +62,14 @@ class FlutterHiveCollectionsDatabase extends HiveCollectionsDatabase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final db = FlutterHiveCollectionsDatabase(
|
final db = FlutterHiveCollectionsDatabase(
|
||||||
'hive_collections_${client.clientName.replaceAll(' ', '_').toLowerCase()}',
|
'hive_${client.clientName.replaceAll(' ', '_').toLowerCase()}',
|
||||||
await _findDatabasePath(client),
|
await _findDatabasePath(client),
|
||||||
key: hiverCipher,
|
key: hiverCipher,
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
await db.open();
|
await db.open();
|
||||||
} catch (_) {
|
} catch (e, s) {
|
||||||
Logs().w('Unable to open Hive. Delete database and storage key...');
|
Logs().w('Unable to open Hive. Delete database and storage key...', e, s);
|
||||||
const FlutterSecureStorage().delete(key: _cipherStorageKey);
|
const FlutterSecureStorage().delete(key: _cipherStorageKey);
|
||||||
await db.clear();
|
await db.clear();
|
||||||
rethrow;
|
rethrow;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user