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

Commit ee59cad

Browse files
authored
Merge pull request #5137 from corona-warn-app/fix/14949-re-opened-test-certificates-shouldnt-be-loading
fix/14949 re opened test certificates shouldnt be loading
2 parents 1b56c56 + acacbaf commit ee59cad

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/xcode/ENA/ENA/Source/Scenes/HealthCertificates/Overview/Cells/TestCertificateRequest/TestCertificateRequestCellModel.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ class TestCertificateRequestCellModel {
4949
private var subscriptions = Set<AnyCancellable>()
5050

5151
private func updateLoadingState(isLoading: Bool) {
52+
guard !CWAHibernationProvider.shared.isHibernationState else {
53+
subtitle = AppStrings.HealthCertificate.Overview.TestCertificateRequest.errorSubtitle
54+
isLoadingStateHidden = true
55+
buttonsHidden = false
56+
return
57+
}
5258
if isLoading {
5359
subtitle = AppStrings.HealthCertificate.Overview.TestCertificateRequest.loadingSubtitle
5460
} else {

src/xcode/ENA/ENA/Source/Services/HealthCertificate/HealthCertificateRequestService.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ class HealthCertificateRequestService {
185185
NotificationCenter.default.ocombine
186186
.publisher(for: UIApplication.didBecomeActiveNotification)
187187
.sink { [weak self] _ in
188-
guard let self = self, self.healthCertificateService.isSetUp else {
188+
guard let self = self,
189+
self.healthCertificateService.isSetUp,
190+
!CWAHibernationProvider.shared.isHibernationState else {
189191
return
190192
}
191193

@@ -197,7 +199,7 @@ class HealthCertificateRequestService {
197199

198200
healthCertificateService.$isSetUp
199201
.sink { [weak self] isSetUp in
200-
guard isSetUp else {
202+
guard isSetUp, !CWAHibernationProvider.shared.isHibernationState else {
201203
return
202204
}
203205

0 commit comments

Comments
 (0)