hotfix: initWithStore

This commit is contained in:
Christian Pauly 2020-10-04 13:07:04 +02:00
parent 9b572f59a6
commit 2f8491b41b
2 changed files with 2 additions and 5 deletions

View File

@ -85,10 +85,8 @@ class MatrixState extends State<Matrix> {
void _initWithStore() async {
var initLoginState = client.onLoginStateChanged.stream.first;
try {
client.database = await getDatabase(client).timeout(
Duration(seconds: 15),
);
client.connect();
client.database = await getDatabase(client);
await client.connect();
if (await initLoginState == LoginState.logged && PlatformInfos.isMobile) {
await FirebaseController.setupFirebase(
this,

View File

@ -31,7 +31,6 @@ Future<Database> getDatabase(Client client) async {
filename: 'moor.sqlite',
password: password,
);
debugPrint('[Moor] Database has been created');
if (needMigration) {
debugPrint('[Moor] Start migration');
await migrate(client.clientName, _db, store);