fix: Removing sembast

This commit is contained in:
Krille Fear 2021-11-18 21:24:01 +01:00
parent d20a5c30ac
commit 99502cf427

View File

@ -6,7 +6,6 @@ import 'package:hive_flutter/hive_flutter.dart';
import 'package:matrix/encryption/utils/key_verification.dart'; import 'package:matrix/encryption/utils/key_verification.dart';
import 'package:matrix/matrix.dart'; import 'package:matrix/matrix.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:sembast/sembast.dart';
import 'package:fluffychat/utils/platform_infos.dart'; import 'package:fluffychat/utils/platform_infos.dart';
import 'famedlysdk_store.dart'; import 'famedlysdk_store.dart';
@ -39,14 +38,12 @@ abstract class ClientManager {
await Store().setItem(clientNamespace, jsonEncode(clientNames.toList())); await Store().setItem(clientNamespace, jsonEncode(clientNames.toList()));
} }
final clients = clientNames.map(createClient).toList(); final clients = clientNames.map(createClient).toList();
disableSembastCooperator();
await Future.wait(clients.map((client) => client await Future.wait(clients.map((client) => client
.init( .init(
waitForFirstSync: false, waitForFirstSync: false,
waitUntilLoadCompletedLoaded: false, waitUntilLoadCompletedLoaded: false,
) )
.catchError((e, s) => Logs().e('Unable to initialize client', e, s)))); .catchError((e, s) => Logs().e('Unable to initialize client', e, s))));
enableSembastCooperator();
if (clients.length > 1 && clients.any((c) => !c.isLogged())) { if (clients.length > 1 && clients.any((c) => !c.isLogged())) {
final loggedOutClients = clients.where((c) => !c.isLogged()).toList(); final loggedOutClients = clients.where((c) => !c.isLogged()).toList();
for (final client in loggedOutClients) { for (final client in loggedOutClients) {