Remove defunct ReconnectCwtchForeground handlers
continuous-integration/drone/pr Build is pending Details

This commit is contained in:
Sarah Jamie Lewis 2024-02-26 18:26:49 -08:00
parent da0d63b0dc
commit 14fa3b1a5b
Signed by: sarah
GPG Key ID: F27FD21A270837EF
5 changed files with 2 additions and 20 deletions

View File

@ -577,9 +577,6 @@ class MainActivity: FlutterActivity() {
result.success(Cwtch.searchConversations(profile, pattern))
return
}
"ReconnectCwtchForeground" -> {
Cwtch.reconnectCwtchForeground()
}
"Shutdown" -> {
Cwtch.shutdownCwtch();
}

View File

@ -11,8 +11,6 @@ abstract class Cwtch {
// ignore: non_constant_identifier_names
Future<void> Start();
// ignore: non_constant_identifier_names
Future<void> ReconnectCwtchForeground();
Future<String> getCwtchDir();

View File

@ -58,7 +58,7 @@ class CwtchNotifier {
// EnvironmentConfig.debugLog("NewEvent $type $data");
switch (type) {
case "CwtchStarted":
if (data["Reload"] == "true" && profileCN.num > 0 ) {
if (data["Reload"] == "true" && profileCN.num > 0) {
// don't reload...
// unless we have loaded no profiles...then there isnt a risk and this
// might be a first time (e.g. new apk, existing service)
@ -66,6 +66,7 @@ class CwtchNotifier {
EnvironmentConfig.debugLog("Reloading....${data}");
flwtchState.cwtch.LoadProfiles(DefaultPassword);
}
appState.SetCwtchInit();
break;
case "CwtchStartError":

View File

@ -270,14 +270,6 @@ class CwtchFfi implements Cwtch {
return _cwtchDir;
}
// ignore: non_constant_identifier_names
Future<void> ReconnectCwtchForeground() async {
var reconnectCwtch = library.lookup<NativeFunction<Void Function()>>("c_ReconnectCwtchForeground");
// ignore: non_constant_identifier_names
final ReconnectCwtchForeground = reconnectCwtch.asFunction<void Function()>();
ReconnectCwtchForeground();
}
// Called on object being disposed to (presumably on app close) to close the isolate that's listening to libcwtch-go events
@override
void dispose() {

View File

@ -86,12 +86,6 @@ class CwtchGomobile implements Cwtch {
cwtchPlatform.invokeMethod("Start", {"appDir": _cwtchDir, "torPath": torPath});
}
@override
// ignore: non_constant_identifier_names
Future<void> ReconnectCwtchForeground() async {
cwtchPlatform.invokeMethod("ReconnectCwtchForeground", {});
}
// Handle libcwtch-go events (received via kotlin) and dispatch to the cwtchNotifier
Future<void> _handleAppbusEvent(MethodCall call) async {
final String json = call.arguments;