Merge branch 'ChristianPauly-master-patch-06127' into 'master'

close database konditional

See merge request famedly/famedlysdk!311
This commit is contained in:
Christian Pauly 2020-05-19 08:10:11 +00:00
commit cec3401867

View file

@ -2181,9 +2181,9 @@ class Client {
/// Stops the synchronization and closes the database. After this /// Stops the synchronization and closes the database. After this
/// you can safely make this Client instance null. /// you can safely make this Client instance null.
Future<void> dispose() async { Future<void> dispose({bool closeDatabase = false}) async {
_disposed = true; _disposed = true;
await database?.close(); if (closeDatabase) await database?.close();
database = null; database = null;
return; return;
} }