fix: exception
This commit is contained in:
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user