From 52f8c03f38fca1d8590e06722ffaa8982540e58f Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Tue, 26 Nov 2024 12:19:09 -0800 Subject: [PATCH] add sync all --- .../java/org/xmtp/android/library/ConversationsTest.kt | 5 ----- .../src/main/java/org/xmtp/android/library/Conversations.kt | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/library/src/androidTest/java/org/xmtp/android/library/ConversationsTest.kt b/library/src/androidTest/java/org/xmtp/android/library/ConversationsTest.kt index 80c8d0f04..a916b2091 100644 --- a/library/src/androidTest/java/org/xmtp/android/library/ConversationsTest.kt +++ b/library/src/androidTest/java/org/xmtp/android/library/ConversationsTest.kt @@ -209,8 +209,6 @@ class ConversationsTest { runBlocking { boClient.conversations.sync() boDm?.sync() - alixClient.conversations.sync() - alixClient2.conversations.sync() alixClient2.preferences.syncConsent() alixClient.conversations.syncAllConversations() Thread.sleep(2000) @@ -267,7 +265,6 @@ class ConversationsTest { runBlocking { alixGroup.send("Hello") - alixClient2.conversations.sync() alixClient.conversations.syncAllConversations() alixClient2.conversations.syncAllConversations() } @@ -289,8 +286,6 @@ class ConversationsTest { alix2Group.updateConsentState(ConsentState.DENIED) val dm3 = alixClient2.conversations.newConversation(caro.walletAddress) dm3.updateConsentState(ConsentState.DENIED) - alixClient.conversations.sync() - alixClient2.conversations.sync() alixClient.conversations.syncAllConversations() alixClient2.conversations.syncAllConversations() } diff --git a/library/src/main/java/org/xmtp/android/library/Conversations.kt b/library/src/main/java/org/xmtp/android/library/Conversations.kt index 35619a15b..3c4fcbe8c 100644 --- a/library/src/main/java/org/xmtp/android/library/Conversations.kt +++ b/library/src/main/java/org/xmtp/android/library/Conversations.kt @@ -127,7 +127,7 @@ data class Conversations( ffiConversations.sync() } - // Sync all existing local conversation data from the network (Note: call syncConversations() first to get the latest list of conversations) + // Sync all new and existing conversations data from the network suspend fun syncAllConversations(): UInt { return ffiConversations.syncAllConversations() }