fix: exception

This commit is contained in:
Hiddify
2024-09-29 08:16:03 +00:00
parent ba764751b3
commit 40b315cc5b
3 changed files with 4506 additions and 18 deletions

View File

@@ -25,7 +25,7 @@ class MethodHandler(private val scope: CoroutineScope) : FlutterPlugin,
enum class Trigger(val method: String) {
Setup("setup"),
ParseConfig("parse_config"),
ChangeConfigOptions("change_config_options"),
changeHiddifyOptions("change_hiddify_options"),
GenerateConfig("generate_config"),
Start("start"),
Stop("stop"),
@@ -73,7 +73,7 @@ class MethodHandler(private val scope: CoroutineScope) : FlutterPlugin,
}
}
Trigger.ChangeConfigOptions.method -> {
Trigger.ChangeHiddifyOptions.method -> {
scope.launch {
result.runCatching {
val args = call.arguments as String

File diff suppressed because it is too large Load Diff

View File

@@ -119,7 +119,7 @@ class FFISingboxService with InfraLogger implements SingboxService {
() => CombineWorker().execute(
() {
final json = jsonEncode(options.toJson());
final err = _box.changeConfigOptions(json.toNativeUtf8().cast()).cast<Utf8>().toDartString();
final err = _box.changeHiddifyOptions(json.toNativeUtf8().cast()).cast<Utf8>().toDartString();
if (err.isNotEmpty) {
return left(err);
}