refactor: Only preload client for GUI start
This commit is contained in:
parent
8ea64a9522
commit
d569a00df7
1 changed files with 5 additions and 5 deletions
|
|
@ -22,11 +22,6 @@ void main() async {
|
||||||
Logs().nativeColors = !PlatformInfos.isIOS;
|
Logs().nativeColors = !PlatformInfos.isIOS;
|
||||||
final clients = await ClientManager.getClients();
|
final clients = await ClientManager.getClients();
|
||||||
|
|
||||||
// Preload first client
|
|
||||||
final firstClient = clients.firstOrNull;
|
|
||||||
await firstClient?.roomsLoading;
|
|
||||||
await firstClient?.accountDataLoading;
|
|
||||||
|
|
||||||
// If the app starts in detached mode, we assume that it is in
|
// If the app starts in detached mode, we assume that it is in
|
||||||
// background fetch mode for processing push notifications. This is
|
// background fetch mode for processing push notifications. This is
|
||||||
// currently only supported on Android.
|
// currently only supported on Android.
|
||||||
|
|
@ -63,6 +58,11 @@ Future<void> startGui(List<Client> clients) async {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Preload first client
|
||||||
|
final firstClient = clients.firstOrNull;
|
||||||
|
await firstClient?.roomsLoading;
|
||||||
|
await firstClient?.accountDataLoading;
|
||||||
|
|
||||||
runApp(FluffyChatApp(clients: clients, pincode: pin));
|
runApp(FluffyChatApp(clients: clients, pincode: pin));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue