Skip to content

Commit

Permalink
Update SearchRepositoryKt#trackedEntity function to return list of …
Browse files Browse the repository at this point in the history
…TEIs
  • Loading branch information
msasikanth committed Feb 28, 2024
1 parent 845aab3 commit d7ebf90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,12 @@ class SearchRepositoryImplKt(
} ?: trackedEntitySearchFields(teiTypeUid)
}

override suspend fun trackedEntity(
override suspend fun searchTrackedEntitiesImmediate(
searchParametersModel: SearchParametersModel,
isOnline: Boolean,
): TrackedEntitySearchItem? {
): List<TrackedEntitySearchItem> {
return trackedEntitySearchQuery(searchParametersModel, isOnline)
.blockingGet()
.firstOrNull()
}

private fun programTrackedEntityAttributes(programUid: String): List<FieldUiModel> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ interface SearchRepositoryKt {

suspend fun searchParameters(programUid: String?, teiTypeUid: String): List<FieldUiModel>

suspend fun trackedEntity(searchParametersModel: SearchParametersModel, isOnline: Boolean): TrackedEntitySearchItem?
suspend fun searchTrackedEntitiesImmediate(searchParametersModel: SearchParametersModel, isOnline: Boolean): List<TrackedEntitySearchItem>
}

0 comments on commit d7ebf90

Please sign in to comment.