diff --git a/lib/utils/client_manager.dart b/lib/utils/client_manager.dart index 6c89669c6..4a32b03c4 100644 --- a/lib/utils/client_manager.dart +++ b/lib/utils/client_manager.dart @@ -32,12 +32,18 @@ abstract class ClientManager { } if (clientNames.isEmpty) clientNames.add(PlatformInfos.clientName); final clients = clientNames.map(createClient).toList(); + final start = DateTime.now(); await Future.wait(clients.map((client) => client - .init() + .init(waitForFirstSync: false) .catchError((e, s) => Logs().e('Unable to initialize client', e, s)))); + final end = DateTime.now(); + print( + 'We needed: ${end.millisecondsSinceEpoch - start.millisecondsSinceEpoch} milliseconds'); if (clients.length > 1 && clients.any((c) => !c.isLogged())) { final loggedOutClients = clients.where((c) => !c.isLogged()).toList(); for (final client in loggedOutClients) { + Logs().w( + 'Multi account is enabled but client ${client.userID} is not logged in. Removing...'); clientNames.remove(client.clientName); clients.remove(client); } diff --git a/pubspec.lock b/pubspec.lock index 83cad5e40..cab537278 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -742,10 +742,12 @@ packages: matrix: dependency: "direct main" description: - name: matrix - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.3" + path: "." + ref: "krille/init-configurable" + resolved-ref: b3c6b5f637ed7f4547f005e5e64670c49366e73d + url: "https://gitlab.com/famedly/company/frontend/famedlysdk.git" + source: git + version: "0.5.4" matrix_api_lite: dependency: transitive description: @@ -964,7 +966,7 @@ packages: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "4.3.0" + version: "4.1.0" pin_code_text_field: dependency: "direct main" description: @@ -1118,7 +1120,7 @@ packages: name: sentry url: "https://pub.dartlang.org" source: hosted - version: "6.0.0" + version: "6.0.1" share: dependency: "direct main" description: @@ -1613,7 +1615,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.3.0" + version: "5.1.2" yaml: dependency: transitive description: @@ -1622,5 +1624,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.14.0 <3.0.0" + dart: ">=2.13.0 <3.0.0" flutter: ">=2.2.0" diff --git a/pubspec.yaml b/pubspec.yaml index ab882de0d..aaf9442bf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -49,7 +49,10 @@ dependencies: intl: any localstorage: ^4.0.0+1 lottie: ^1.1.0 - matrix: ^0.5.3 + matrix: + git: + url: https://gitlab.com/famedly/company/frontend/famedlysdk.git + ref: krille/init-configurable matrix_link_text: ^1.0.2 native_imaging: git: https://gitlab.com/famedly/libraries/native_imaging.git