Skip to content
Snippets Groups Projects
Unverified Commit b960fbaa authored by Juraj Kusnier's avatar Juraj Kusnier Committed by GitHub
Browse files

Fix "Testcertificate not supported" on pending testresult screen (EXPOSUREAPP-7752) (#3423)


* implement isDccSupportedByPoc into SubmissionTestResultPendingViewModel

* small code update

Co-authored-by: default avatarKolya Opahle <k.opahle@sap.com>
Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
parent 08f9b90b
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,10 @@ class SubmissionTestResultPendingFragment : Fragment(R.layout.fragment_submissio
}
}
viewModel.testCertResultInfo.observe2(this) { result ->
binding.testResultPendingStepsCertificateInfo.setEntryText(result.get(requireContext()))
}
binding.apply {
val isPcr = navArgs.testType == CoronaTest.Type.PCR
testResultPendingStepsWaitingAntigenResult.isVisible = !isPcr
......
......@@ -101,12 +101,16 @@ class SubmissionTestResultPendingViewModel @AssistedInject constructor(
val testCertResultInfo: LiveData<LazyString> = testResultFlow
.map {
when (it.coronaTest.type) {
CoronaTest.Type.RAPID_ANTIGEN ->
when {
!it.coronaTest.isDccSupportedByPoc -> {
R.string.submission_test_result_pending_steps_test_certificate_not_supported_body
CoronaTest.Type.PCR -> when (it.coronaTest.isAdvancedConsentGiven) {
true -> R.string.submission_test_result_pending_steps_test_certificate_not_available_yet_body
false -> R.string.submission_test_result_pending_steps_test_certificate_not_desired_by_user_body
}
else -> {
if (it.coronaTest.isAdvancedConsentGiven) {
R.string.submission_test_result_pending_steps_test_certificate_not_available_yet_body
} else {
R.string.submission_test_result_pending_steps_test_certificate_not_desired_by_user_body
}
}
}.toResolvingString()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment