From 5e58b24cc2cc633a8213e388bf725082a35510b3 Mon Sep 17 00:00:00 2001 From: cbullinger Date: Wed, 2 Aug 2023 11:42:32 -0400 Subject: [PATCH] Fix autobuilder error --- .../com/mongodb/realm/realmkmmapp/ManageSyncSession.kt | 6 ++++-- .../ManageSyncSession.snippet.monitor-network-connection.kt | 6 ++++-- source/sdk/kotlin/sync/partition-based-sync.txt | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/kotlin/shared/src/commonTest/kotlin/com/mongodb/realm/realmkmmapp/ManageSyncSession.kt b/examples/kotlin/shared/src/commonTest/kotlin/com/mongodb/realm/realmkmmapp/ManageSyncSession.kt index ef1cc5a17e..0ff4626707 100644 --- a/examples/kotlin/shared/src/commonTest/kotlin/com/mongodb/realm/realmkmmapp/ManageSyncSession.kt +++ b/examples/kotlin/shared/src/commonTest/kotlin/com/mongodb/realm/realmkmmapp/ManageSyncSession.kt @@ -184,8 +184,10 @@ class ManageSyncSession : RealmTest() { val flow = CoroutineScope(Dispatchers.Default).launch { // :snippet-start: monitor-network-connection val connectionFlow = realm.syncSession.connectionStateAsFlow() - connectionFlow.collect { - Log.i("Connected to Atlas Device Sync server") + connectionFlow.collect { ConnectionStateChange -> + if (ConnectionStateChange.newState == ConnectionState.CONNECTED) { + Log.i("Connected to Atlas Device Sync server") + } } // :snippet-end: } diff --git a/source/examples/generated/kotlin/ManageSyncSession.snippet.monitor-network-connection.kt b/source/examples/generated/kotlin/ManageSyncSession.snippet.monitor-network-connection.kt index 5479ab681d..909db33249 100644 --- a/source/examples/generated/kotlin/ManageSyncSession.snippet.monitor-network-connection.kt +++ b/source/examples/generated/kotlin/ManageSyncSession.snippet.monitor-network-connection.kt @@ -1,4 +1,6 @@ val connectionFlow = realm.syncSession.connectionStateAsFlow() -connectionFlow.collect { - Log.i("Connected to Atlas Device Sync server") +connectionFlow.collect { ConnectionStateChange -> + if (ConnectionStateChange.newState == ConnectionState.CONNECTED) { + Log.i("Connected to Atlas Device Sync server") + } } diff --git a/source/sdk/kotlin/sync/partition-based-sync.txt b/source/sdk/kotlin/sync/partition-based-sync.txt index 3fcf028501..46cf0e7cd3 100644 --- a/source/sdk/kotlin/sync/partition-based-sync.txt +++ b/source/sdk/kotlin/sync/partition-based-sync.txt @@ -103,7 +103,7 @@ configuration options and more granular data synchronization. For more information about how to migrate your App Services App from Partition-Based Sync to Flexible Sync, refer to :ref:`Migrate Device Sync Modes -<{+kotlin-sync-prefix+}io.realm.kotlin.mongodb.sync-sync-migrate-modes>`. +`. .. _kotlin-update-client-code-after-pbs-to-fs-migration: