diff --git a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchRepositoryImplKt.kt b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchRepositoryImplKt.kt index 2761fe01f27..00d3affc818 100644 --- a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchRepositoryImplKt.kt +++ b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchRepositoryImplKt.kt @@ -85,13 +85,12 @@ class SearchRepositoryImplKt( } ?: trackedEntitySearchFields(teiTypeUid) } - override suspend fun trackedEntity( + override suspend fun searchTrackedEntitiesImmediate( searchParametersModel: SearchParametersModel, isOnline: Boolean, - ): TrackedEntitySearchItem? { + ): List { return trackedEntitySearchQuery(searchParametersModel, isOnline) .blockingGet() - .firstOrNull() } private fun programTrackedEntityAttributes(programUid: String): List { diff --git a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchRepositoryKt.kt b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchRepositoryKt.kt index 63750e6a599..0b93ebd1d0f 100644 --- a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchRepositoryKt.kt +++ b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/SearchRepositoryKt.kt @@ -15,5 +15,5 @@ interface SearchRepositoryKt { suspend fun searchParameters(programUid: String?, teiTypeUid: String): List - suspend fun trackedEntity(searchParametersModel: SearchParametersModel, isOnline: Boolean): TrackedEntitySearchItem? + suspend fun searchTrackedEntitiesImmediate(searchParametersModel: SearchParametersModel, isOnline: Boolean): List }