From 45459cf76a5efd9c8298ebf7027058bbccf022aa Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 29 Jun 2021 16:41:38 -0700 Subject: [PATCH 1/2] Show Syncing Message + Update libcwtch-go to fix message fetching issues --- LIBCWTCH-GO.version | 2 +- lib/cwtch/cwtchNotifier.dart | 1 + lib/widgets/messagelist.dart | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/LIBCWTCH-GO.version b/LIBCWTCH-GO.version index 271b7350..59f1a531 100644 --- a/LIBCWTCH-GO.version +++ b/LIBCWTCH-GO.version @@ -1 +1 @@ -v1.0.0-7-g520d35a-2021-06-25-16-34 \ No newline at end of file +v1.0.0-12-g2e0b6ef-2021-06-29-23-42 \ No newline at end of file diff --git a/lib/cwtch/cwtchNotifier.dart b/lib/cwtch/cwtchNotifier.dart index d5597674..7551526a 100644 --- a/lib/cwtch/cwtchNotifier.dart +++ b/lib/cwtch/cwtchNotifier.dart @@ -245,6 +245,7 @@ class CwtchNotifier { break; case "ServerStateChange": // Update the Server Cache + EnvironmentConfig.debugLog("server state changes $data"); profileCN.getProfile(data["ProfileOnion"])?.updateServerStatusCache(data["GroupServer"], data["ConnectionState"]); profileCN.getProfile(data["ProfileOnion"])?.contactList.contacts.forEach((contact) { if (contact.isGroup == true && contact.server == data["GroupServer"]) { diff --git a/lib/widgets/messagelist.dart b/lib/widgets/messagelist.dart index 67158294..b17b7bbf 100644 --- a/lib/widgets/messagelist.dart +++ b/lib/widgets/messagelist.dart @@ -24,8 +24,8 @@ class _MessageListState extends State { bool showEphemeralWarning = (isP2P && Provider.of(context).savePeerHistory != "SaveHistory"); bool showOfflineWarning = Provider.of(context).isOnline() == false; - bool showMessageWarning = showEphemeralWarning || showOfflineWarning; bool showSyncing = isGroupAndSyncing; + bool showMessageWarning = showEphemeralWarning || showOfflineWarning || showSyncing; // Only load historical messages when the conversation is with a p2p contact OR the conversation is a server and *not* syncing. bool loadMessages = isP2P || (isGroupAndSynced || isGroupAndNotAuthenticated); From 9c9ea3845683357450ce47fea53f3cbbbf07db6a Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 29 Jun 2021 17:17:42 -0700 Subject: [PATCH 2/2] Propagate group name on Android properly --- android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt b/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt index 7cb33d71..35ebf16c 100644 --- a/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt +++ b/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt @@ -178,7 +178,7 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) : "CreateGroup" -> { val profile = (a.get("ProfileOnion") as? String) ?: "" val server = (a.get("server") as? String) ?: "" - val groupName = (a.get("groupname") as? String) ?: "" + val groupName = (a.get("groupName") as? String) ?: "" Cwtch.createGroup(profile, server, groupName) } "DeleteProfile" -> {