|
|
|
@ -255,6 +255,7 @@ class MainActivity: FlutterActivity() {
|
|
|
|
|
// the frontend calls Start every time it fires up, but we don't want to *actually* call Cwtch.Start()
|
|
|
|
|
// in case the ForegroundService is still running. in both cases, however, we *do* want to re-register
|
|
|
|
|
// the eventbus listener.
|
|
|
|
|
|
|
|
|
|
when (call.method) {
|
|
|
|
|
"Start" -> {
|
|
|
|
|
val uniqueTag = argmap["torPath"] ?: "nullEventBus"
|
|
|
|
@ -384,7 +385,11 @@ class MainActivity: FlutterActivity() {
|
|
|
|
|
result.success(Cwtch.deleteServerInfo(profile, handle))
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"PublishServerUpdate" -> {
|
|
|
|
|
val profile: String = call.argument("ProfileOnion") ?: ""
|
|
|
|
|
result.success(Cwtch.publishServerUpdate(profile))
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
"PeerWithOnion" -> {
|
|
|
|
|
val profile: String = call.argument("ProfileOnion") ?: ""
|
|
|
|
|
val onion: String = call.argument("onion") ?: ""
|
|
|
|
@ -420,7 +425,7 @@ class MainActivity: FlutterActivity() {
|
|
|
|
|
Cwtch.activatePeerEngine(profile)
|
|
|
|
|
}
|
|
|
|
|
"ConfigureConnections" -> {
|
|
|
|
|
val profile: String = call.argument("profile") ?: ""
|
|
|
|
|
val profile: String = call.argument("ProfileOnion") ?: ""
|
|
|
|
|
val listen: Boolean = call.argument("listen") ?: false
|
|
|
|
|
val peers: Boolean = call.argument("peers") ?: false
|
|
|
|
|
val servers: Boolean = call.argument("servers") ?: false
|
|
|
|
|