From dee5752d3887b1a913c2cee9516f4a7c8d2e1c29 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 2 Aug 2023 09:49:36 -0700 Subject: [PATCH] Cleanup + Android Support --- android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt | 6 ++++++ lib/cwtch/cwtchNotifier.dart | 2 +- lib/widgets/messagelist.dart | 2 -- 3 files changed, 7 insertions(+), 3 deletions(-) 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 c4cdda25..f0a49033 100644 --- a/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt +++ b/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt @@ -517,6 +517,12 @@ class MainActivity: FlutterActivity() { result.success(Cwtch.importProfile(file, pass)) return } + "SearchConversations" -> { + val profile: String = call.argument("ProfileOnion") ?: "" + val pattern: String = call.argument("pattern") ?: "" + result.success(Cwtch.searchConversations(profile, pattern)) + return + } "ReconnectCwtchForeground" -> { Cwtch.reconnectCwtchForeground() } diff --git a/lib/cwtch/cwtchNotifier.dart b/lib/cwtch/cwtchNotifier.dart index d545ad36..6c48edb5 100644 --- a/lib/cwtch/cwtchNotifier.dart +++ b/lib/cwtch/cwtchNotifier.dart @@ -59,7 +59,7 @@ class CwtchNotifier { } void handleMessage(String type, dynamic data) { - //EnvironmentConfig.debugLog("NewEvent $type $data"); + // EnvironmentConfig.debugLog("NewEvent $type $data"); switch (type) { case "CwtchStarted": appState.SetCwtchInit(); diff --git a/lib/widgets/messagelist.dart b/lib/widgets/messagelist.dart index 9fe8bed2..257afc22 100644 --- a/lib/widgets/messagelist.dart +++ b/lib/widgets/messagelist.dart @@ -31,8 +31,6 @@ class _MessageListState extends State { ByIndex(0).loadUnsynced(Provider.of(context, listen: false).cwtch, Provider.of(outerContext, listen: false).selectedProfile!, conversationId, cache!); } var initi = Provider.of(outerContext, listen: false).initialScrollIndex; - //MessageCache? cache = Provider.of(outerContext, listen: false).contactList.getContact(conversationId)?.messageCache; - bool isP2P = !Provider.of(context).isGroup; bool isGroupAndSyncing = Provider.of(context).isGroup == true && Provider.of(context).status == "Authenticated";