mirror of
https://github.com/krille-chan/fluffychat
synced 2024-10-05 13:52:46 +00:00
chore: Follow up database broken handling
This commit is contained in:
parent
eb9cf18d30
commit
8a9715cac2
1 changed files with 4 additions and 9 deletions
|
@ -23,15 +23,8 @@ Future<DatabaseApi> flutterMatrixSdkDatabaseBuilder(Client client) async {
|
|||
database = await _constructDatabase(client);
|
||||
await database.open();
|
||||
return database;
|
||||
} catch (e) {
|
||||
// Try to delete database so that it can created again on next init:
|
||||
database?.delete().catchError(
|
||||
(e, s) => Logs().w(
|
||||
'Unable to delete database, after failed construction',
|
||||
e,
|
||||
s,
|
||||
),
|
||||
);
|
||||
} catch (e, s) {
|
||||
Logs().wtf('Unable to build database!', e, s);
|
||||
|
||||
// Send error notification:
|
||||
final l10n = lookupL10n(PlatformDispatcher.instance.locale);
|
||||
|
@ -101,6 +94,8 @@ Future<MatrixSdkDatabase> _constructDatabase(Client client) async {
|
|||
Logs().w('Unable to init database encryption', e, s);
|
||||
}
|
||||
|
||||
print('$path/${client.clientName}');
|
||||
|
||||
return MatrixSdkDatabase(
|
||||
client.clientName,
|
||||
database: await openDatabase(
|
||||
|
|
Loading…
Reference in a new issue