fix: Fluffychat sometimes forgetting that a client is logged in

This commit is contained in:
Sorunome 2021-09-21 09:00:42 +02:00
parent 396a433cae
commit b015604faf
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
1 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,10 @@ abstract class ClientManager {
Logs().w('Client names in store are corrupted', e, s);
await Store().deleteItem(clientNamespace);
}
if (clientNames.isEmpty) clientNames.add(PlatformInfos.clientName);
if (clientNames.isEmpty) {
clientNames.add(PlatformInfos.clientName);
await Store().setItem(clientNamespace, jsonEncode(clientNames.toList()));
}
final clients = clientNames.map(createClient).toList();
await Future.wait(clients.map((client) => client
.init(waitForFirstSync: false)