mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-20 02:59:26 +01:00
feat: Speed up app start
This commit is contained in:
parent
3fdf2bf80d
commit
b903bf8472
@ -386,6 +386,8 @@ class ChatListController extends State<ChatList> {
|
||||
|
||||
Future<void> waitForFirstSync() async {
|
||||
final client = Matrix.of(context).client;
|
||||
await client.roomsLoading;
|
||||
await client.accountDataLoading;
|
||||
if (client.prevBatch?.isEmpty ?? true) {
|
||||
await client.onFirstSync.stream.first;
|
||||
}
|
||||
|
@ -37,7 +37,10 @@ abstract class ClientManager {
|
||||
}
|
||||
final clients = clientNames.map(createClient).toList();
|
||||
await Future.wait(clients.map((client) => client
|
||||
.init(waitForFirstSync: false)
|
||||
.init(
|
||||
waitForFirstSync: false,
|
||||
waitUntilFullLoaded: false,
|
||||
)
|
||||
.catchError((e, s) => Logs().e('Unable to initialize client', e, s))));
|
||||
if (clients.length > 1 && clients.any((c) => !c.isLogged())) {
|
||||
final loggedOutClients = clients.where((c) => !c.isLogged()).toList();
|
||||
|
@ -752,9 +752,11 @@ packages:
|
||||
matrix:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: matrix
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
path: "."
|
||||
ref: "krille/improve-start-up-time"
|
||||
resolved-ref: "6585cf195f414175c72693f720569d9ce68319d2"
|
||||
url: "https://gitlab.com/famedly/company/frontend/famedlysdk.git"
|
||||
source: git
|
||||
version: "0.7.0-nullsafety.3"
|
||||
matrix_api_lite:
|
||||
dependency: "direct overridden"
|
||||
|
@ -112,5 +112,9 @@ dependency_overrides:
|
||||
hosted:
|
||||
name: geolocator_android
|
||||
url: https://hanntech-gmbh.gitlab.io/free2pass/flutter-geolocator-floss
|
||||
matrix:
|
||||
git:
|
||||
url: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
||||
ref: krille/improve-start-up-time
|
||||
matrix_api_lite: ^0.5.0
|
||||
provider: 5.0.0
|
Loading…
Reference in New Issue
Block a user