fix: More debug logs
This commit is contained in:
parent
028b1e4ed8
commit
9b572f59a6
|
@ -85,7 +85,9 @@ class MatrixState extends State<Matrix> {
|
||||||
void _initWithStore() async {
|
void _initWithStore() async {
|
||||||
var initLoginState = client.onLoginStateChanged.stream.first;
|
var initLoginState = client.onLoginStateChanged.stream.first;
|
||||||
try {
|
try {
|
||||||
client.database = await getDatabase(client);
|
client.database = await getDatabase(client).timeout(
|
||||||
|
Duration(seconds: 15),
|
||||||
|
);
|
||||||
client.connect();
|
client.connect();
|
||||||
if (await initLoginState == LoginState.logged && PlatformInfos.isMobile) {
|
if (await initLoginState == LoginState.logged && PlatformInfos.isMobile) {
|
||||||
await FirebaseController.setupFirebase(
|
await FirebaseController.setupFirebase(
|
||||||
|
@ -97,6 +99,7 @@ class MatrixState extends State<Matrix> {
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
client.onLoginStateChanged.sink.addError(e, s);
|
client.onLoginStateChanged.sink.addError(e, s);
|
||||||
captureException(e, s);
|
captureException(e, s);
|
||||||
|
rethrow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,9 @@ Future<Database> getDatabase(Client client) async {
|
||||||
filename: 'moor.sqlite',
|
filename: 'moor.sqlite',
|
||||||
password: password,
|
password: password,
|
||||||
);
|
);
|
||||||
|
debugPrint('[Moor] Database has been created');
|
||||||
if (needMigration) {
|
if (needMigration) {
|
||||||
|
debugPrint('[Moor] Start migration');
|
||||||
await migrate(client.clientName, _db, store);
|
await migrate(client.clientName, _db, store);
|
||||||
await store.setItem('database-password', password);
|
await store.setItem('database-password', password);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue