diff --git a/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt b/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt index 7d19a003..5fc51764 100644 --- a/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt +++ b/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt @@ -577,9 +577,6 @@ class MainActivity: FlutterActivity() { result.success(Cwtch.searchConversations(profile, pattern)) return } - "ReconnectCwtchForeground" -> { - Cwtch.reconnectCwtchForeground() - } "Shutdown" -> { Cwtch.shutdownCwtch(); } diff --git a/lib/cwtch/cwtch.dart b/lib/cwtch/cwtch.dart index c2c04881..c11945fc 100644 --- a/lib/cwtch/cwtch.dart +++ b/lib/cwtch/cwtch.dart @@ -11,8 +11,6 @@ abstract class Cwtch { // ignore: non_constant_identifier_names Future Start(); - // ignore: non_constant_identifier_names - Future ReconnectCwtchForeground(); Future getCwtchDir(); diff --git a/lib/cwtch/cwtchNotifier.dart b/lib/cwtch/cwtchNotifier.dart index b0c03958..82822fbc 100644 --- a/lib/cwtch/cwtchNotifier.dart +++ b/lib/cwtch/cwtchNotifier.dart @@ -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": diff --git a/lib/cwtch/ffi.dart b/lib/cwtch/ffi.dart index 32d7ed69..62505007 100644 --- a/lib/cwtch/ffi.dart +++ b/lib/cwtch/ffi.dart @@ -270,14 +270,6 @@ class CwtchFfi implements Cwtch { return _cwtchDir; } - // ignore: non_constant_identifier_names - Future ReconnectCwtchForeground() async { - var reconnectCwtch = library.lookup>("c_ReconnectCwtchForeground"); - // ignore: non_constant_identifier_names - final ReconnectCwtchForeground = reconnectCwtch.asFunction(); - 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() { diff --git a/lib/cwtch/gomobile.dart b/lib/cwtch/gomobile.dart index e75b95fe..d3db98c0 100644 --- a/lib/cwtch/gomobile.dart +++ b/lib/cwtch/gomobile.dart @@ -86,12 +86,6 @@ class CwtchGomobile implements Cwtch { cwtchPlatform.invokeMethod("Start", {"appDir": _cwtchDir, "torPath": torPath}); } - @override - // ignore: non_constant_identifier_names - Future ReconnectCwtchForeground() async { - cwtchPlatform.invokeMethod("ReconnectCwtchForeground", {}); - } - // Handle libcwtch-go events (received via kotlin) and dispatch to the cwtchNotifier Future _handleAppbusEvent(MethodCall call) async { final String json = call.arguments;