From 2f8491b41b0a743bd434dc33ae458ab7423a5447 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 4 Oct 2020 13:07:04 +0200 Subject: [PATCH] hotfix: initWithStore --- lib/components/matrix.dart | 6 ++---- lib/utils/famedlysdk_store.dart | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/components/matrix.dart b/lib/components/matrix.dart index cc35c21..70a3a1f 100644 --- a/lib/components/matrix.dart +++ b/lib/components/matrix.dart @@ -85,10 +85,8 @@ class MatrixState extends State { 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, diff --git a/lib/utils/famedlysdk_store.dart b/lib/utils/famedlysdk_store.dart index 246827f..31ce349 100644 --- a/lib/utils/famedlysdk_store.dart +++ b/lib/utils/famedlysdk_store.dart @@ -31,7 +31,6 @@ Future 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);