diff --git a/engine/src/main/java/com/google/android/fhir/FhirEngine.kt b/engine/src/main/java/com/google/android/fhir/FhirEngine.kt index 376ff3b327..59ab1f3991 100644 --- a/engine/src/main/java/com/google/android/fhir/FhirEngine.kt +++ b/engine/src/main/java/com/google/android/fhir/FhirEngine.kt @@ -97,7 +97,7 @@ interface FhirEngine { * an empty list. */ suspend fun getLocalChanges(type: ResourceType, id: String): List - + suspend fun getUnsyncedLocalChanges(): List /** * Purges a resource from the database based on resource type and id without any deletion of data * from the server. diff --git a/engine/src/main/java/com/google/android/fhir/impl/FhirEngineImpl.kt b/engine/src/main/java/com/google/android/fhir/impl/FhirEngineImpl.kt index de35675a0b..e3a913990d 100644 --- a/engine/src/main/java/com/google/android/fhir/impl/FhirEngineImpl.kt +++ b/engine/src/main/java/com/google/android/fhir/impl/FhirEngineImpl.kt @@ -79,6 +79,9 @@ internal class FhirEngineImpl(private val database: Database, private val contex override suspend fun getLocalChanges(type: ResourceType, id: String): List { return database.getLocalChanges(type, id) } + // FhirEngineImpl.kt + override suspend fun getUnsyncedLocalChanges(): List = + database.getAllLocalChanges() override suspend fun purge(type: ResourceType, id: String, forcePurge: Boolean) { database.purge(type, id, forcePurge)