Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search latest QR in PdfLauncherViewModel #3499

Merged
merged 5 commits into from
Sep 19, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
): QuestionnaireResponse? {
val searchQuery =
createQuestionnaireResponseSearchQuery(questionnaireId, subjectId, subjectType)
return defaultRepository.search<QuestionnaireResponse>(searchQuery).firstOrNull()
return defaultRepository.search<QuestionnaireResponse>(searchQuery).maxByOrNull {
FikriMilano marked this conversation as resolved.
Show resolved Hide resolved
it.meta.lastUpdated

Check warning on line 59 in android/quest/src/main/java/org/smartregister/fhircore/quest/ui/pdf/PdfLauncherViewModel.kt

View check run for this annotation

Codecov / codecov/patch

android/quest/src/main/java/org/smartregister/fhircore/quest/ui/pdf/PdfLauncherViewModel.kt#L58-L59

Added lines #L58 - L59 were not covered by tests
}
}

/**
Expand All @@ -77,8 +79,6 @@
QuestionnaireResponse.QUESTIONNAIRE,
{ value = "${ResourceType.Questionnaire}/$questionnaireId" },
)
count = 1
from = 0
}
}

Expand Down
Loading