Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #995 from corona-warn-app/dev
Browse files Browse the repository at this point in the history
Dev 1.3.0 to RC/1.3.0
  • Loading branch information
pwoessner authored Aug 11, 2020
2 parents 9235f0d + 5010952 commit 7741c52
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ class ExposureSummaryRepository(private val exposureSummaryDao: ExposureSummaryD
ExposureSummaryRepository.daysSinceLastExposure.postValue(daysSinceLastExposure)
}

suspend fun getLatestExposureSummary(token: String) =
InternalExposureNotificationClient.asyncGetExposureSummary(token)
.also {
matchedKeyCount.postValue(it.matchedKeyCount)
daysSinceLastExposure.postValue(it.daysSinceLastExposure)
}
suspend fun getLatestExposureSummary(token: String) {
if (InternalExposureNotificationClient.asyncIsEnabled())
InternalExposureNotificationClient.asyncGetExposureSummary(token)
.also {
matchedKeyCount.postValue(it.matchedKeyCount)
daysSinceLastExposure.postValue(it.daysSinceLastExposure)
}
}

private fun ExposureSummaryEntity.convertToExposureSummary() =
ExposureSummary.ExposureSummaryBuilder()
Expand Down
7 changes: 7 additions & 0 deletions Corona-Warn-App/src/main/res/values-bg/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,13 @@
<!-- XBUT: Positive button for submission tan invalid -->
<string name="submission_error_dialog_web_tan_invalid_button_positive">"Назад"</string>

<!-- XHED: Dialog title for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_title">"Грешки в теста"</string>
<!-- XMSG: Dialog body for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_body">"Възникнаха грешки при проверката на Вашия тест. Този QR код вече е изтекъл."</string>
<!-- XBUT: Positive button for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_button_positive">"OK"</string>

<!-- Permission Rationale Dialog -->
<!-- XHED: Dialog headline QR Scan permission rationale -->
<string name="submission_qr_code_scan_permission_rationale_dialog_headline">"Изисква се разрешение за използване на камерата"</string>
Expand Down
7 changes: 7 additions & 0 deletions Corona-Warn-App/src/main/res/values-en/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,13 @@
<!-- XBUT: Positive button for submission tan invalid -->
<string name="submission_error_dialog_web_tan_invalid_button_positive">"Back"</string>

<!-- XHED: Dialog title for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_title">"Test has errors"</string>
<!-- XMSG: Dialog body for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_body">"There was a problem evaluating your test. Your QR code has already expired."</string>
<!-- XBUT: Positive button for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_button_positive">"OK"</string>

<!-- Permission Rationale Dialog -->
<!-- XHED: Dialog headline QR Scan permission rationale -->
<string name="submission_qr_code_scan_permission_rationale_dialog_headline">"Camera authorization required"</string>
Expand Down
7 changes: 7 additions & 0 deletions Corona-Warn-App/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,13 @@
<!-- XBUT: Positive button for submission tan invalid -->
<string name="submission_error_dialog_web_tan_invalid_button_positive">"Wstecz"</string>

<!-- XHED: Dialog title for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_title">"Test zawiera błędy"</string>
<!-- XMSG: Dialog body for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_body">"Podczas ustalania wyniku testu pojawił się błąd. Twój kod QR wygasł."</string>
<!-- XBUT: Positive button for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_button_positive">"OK"</string>

<!-- Permission Rationale Dialog -->
<!-- XHED: Dialog headline QR Scan permission rationale -->
<string name="submission_qr_code_scan_permission_rationale_dialog_headline">"Wymagana autoryzacja aparatu"</string>
Expand Down
7 changes: 7 additions & 0 deletions Corona-Warn-App/src/main/res/values-ro/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,13 @@
<!-- XBUT: Positive button for submission tan invalid -->
<string name="submission_error_dialog_web_tan_invalid_button_positive">"Înapoi"</string>

<!-- XHED: Dialog title for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_title">"Testul are erori"</string>
<!-- XMSG: Dialog body for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_body">"A apărut o problemă la evaluarea testului dvs. Codul dvs. QR a expirat deja."</string>
<!-- XBUT: Positive button for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_button_positive">"OK"</string>

<!-- Permission Rationale Dialog -->
<!-- XHED: Dialog headline QR Scan permission rationale -->
<string name="submission_qr_code_scan_permission_rationale_dialog_headline">"Este necesară autorizația pentru camera foto"</string>
Expand Down
7 changes: 7 additions & 0 deletions Corona-Warn-App/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,13 @@
<!-- XBUT: Positive button for submission tan invalid -->
<string name="submission_error_dialog_web_tan_invalid_button_positive">"Geri"</string>

<!-- XHED: Dialog title for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_title">"Testte hata var"</string>
<!-- XMSG: Dialog body for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_body">"Testinizi değerlendirirken bir problem oluştu. QR kodunuzun süresi dolmuş."</string>
<!-- XBUT: Positive button for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_button_positive">"Tamam"</string>

<!-- Permission Rationale Dialog -->
<!-- XHED: Dialog headline QR Scan permission rationale -->
<string name="submission_qr_code_scan_permission_rationale_dialog_headline">"Kamera yetkisi gereklidir"</string>
Expand Down
2 changes: 1 addition & 1 deletion Corona-Warn-App/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@
<!-- XHED: Dialog title for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_title">"Test has errors"</string>
<!-- XMSG: Dialog body for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_body">"There was a problem evaluating your test. Your QR Code has already expired."</string>
<string name="submission_error_dialog_web_tan_redeemed_body">"There was a problem evaluating your test. Your QR code has already expired."</string>
<!-- XBUT: Positive button for submission tan redeemed -->
<string name="submission_error_dialog_web_tan_redeemed_button_positive">"OK"</string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class ExposureSummaryRepositoryTest {

mockkObject(InternalExposureNotificationClient)
coEvery { InternalExposureNotificationClient.asyncGetExposureSummary(any()) } returns buildSummary()
coEvery { InternalExposureNotificationClient.asyncIsEnabled() } returns true

coEvery { dao.getExposureSummaryEntities() } returns listOf()
coEvery { dao.getLatestExposureSummary() } returns null
Expand Down

0 comments on commit 7741c52

Please sign in to comment.