mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 07:35:13 +00:00
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;
|
||||
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
|
||||
// background fetch mode for processing push notifications. This is
|
||||
// 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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue