forked from Henry-Hiles/nexus
init vodozemac in nativeImplementations
This commit is contained in:
parent
fae646003b
commit
aaf6481e92
1 changed files with 5 additions and 4 deletions
|
|
@ -2,8 +2,7 @@ import "dart:convert";
|
||||||
import "dart:io";
|
import "dart:io";
|
||||||
import "package:flutter/foundation.dart";
|
import "package:flutter/foundation.dart";
|
||||||
import "package:nexus/controllers/database_controller.dart";
|
import "package:nexus/controllers/database_controller.dart";
|
||||||
import "package:vodozemac/vodozemac.dart" as voz;
|
import "package:flutter_vodozemac/flutter_vodozemac.dart";
|
||||||
import "package:flutter_vodozemac/flutter_vodozemac.dart" as voz_fl;
|
|
||||||
import "package:matrix/matrix.dart";
|
import "package:matrix/matrix.dart";
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:nexus/controllers/secure_storage_controller.dart";
|
import "package:nexus/controllers/secure_storage_controller.dart";
|
||||||
|
|
@ -19,8 +18,6 @@ class ClientController extends AsyncNotifier<Client> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<Client> build() async {
|
Future<Client> build() async {
|
||||||
if (!voz.isInitialized()) await voz_fl.init();
|
|
||||||
|
|
||||||
final client = Client(
|
final client = Client(
|
||||||
"nexus",
|
"nexus",
|
||||||
logLevel: kReleaseMode ? Level.warning : Level.verbose,
|
logLevel: kReleaseMode ? Level.warning : Level.verbose,
|
||||||
|
|
@ -30,6 +27,10 @@ class ClientController extends AsyncNotifier<Client> {
|
||||||
"nexus",
|
"nexus",
|
||||||
database: await ref.watch(DatabaseController.provider.future),
|
database: await ref.watch(DatabaseController.provider.future),
|
||||||
),
|
),
|
||||||
|
nativeImplementations: NativeImplementationsIsolate(
|
||||||
|
compute,
|
||||||
|
vodozemacInit: init,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final backupJson = await ref
|
final backupJson = await ref
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue