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

Commit 41b85df

Browse files
authored
Merge branch 'release/3.2.x' into fix/14997--EOL---Most-Revelevant-DCC-only-re-calculated-after-additional-app-background
2 parents a93283c + 58736b9 commit 41b85df

15 files changed

+37
-10
lines changed

src/xcode/ENA/ENA/Resources/Localization/bg.lproj/Localizable.links.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,5 @@
6969
"ExposureSubmission_WarnWithoutTAN_FAQLink" = "https://www.coronawarn.app/en/faq/results/#warn_without_tan";
7070

7171
"Home_EndOfLifeThankYouTile_FAQLink" = "https://www.coronawarn.app/en/faq/#ramp_down";
72+
73+
"Home_LinkCard_PandemicRadar_URL" = "https://corona-pandemieradar.de/en";

src/xcode/ENA/ENA/Resources/Localization/de.lproj/Localizable.links.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,5 @@
7171
"ExposureSubmission_WarnWithoutTAN_FAQLink" = "https://www.coronawarn.app/de/faq/results/#warn_without_tan";
7272

7373
"Home_EndOfLifeThankYouTile_FAQLink" = "https://www.coronawarn.app/de/faq/#ramp_down";
74+
75+
"Home_LinkCard_PandemicRadar_URL" = "https://corona-pandemieradar.de/de";

src/xcode/ENA/ENA/Resources/Localization/en.lproj/Localizable.links.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,5 @@
7171
"ExposureSubmission_WarnWithoutTAN_FAQLink" = "https://www.coronawarn.app/en/faq/results/#warn_without_tan";
7272

7373
"Home_EndOfLifeThankYouTile_FAQLink" = "https://www.coronawarn.app/en/faq/#ramp_down";
74+
75+
"Home_LinkCard_PandemicRadar_URL" = "https://corona-pandemieradar.de/en";

src/xcode/ENA/ENA/Resources/Localization/pl.lproj/Localizable.links.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,5 @@
6969
"ExposureSubmission_WarnWithoutTAN_FAQLink" = "https://www.coronawarn.app/en/faq/results/#warn_without_tan";
7070

7171
"Home_EndOfLifeThankYouTile_FAQLink" = "https://www.coronawarn.app/en/faq/#ramp_down";
72+
73+
"Home_LinkCard_PandemicRadar_URL" = "https://corona-pandemieradar.de/en";

src/xcode/ENA/ENA/Resources/Localization/ro.lproj/Localizable.links.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,5 @@
6969
"ExposureSubmission_WarnWithoutTAN_FAQLink" = "https://www.coronawarn.app/en/faq/results/#warn_without_tan";
7070

7171
"Home_EndOfLifeThankYouTile_FAQLink" = "https://www.coronawarn.app/en/faq/#ramp_down";
72+
73+
"Home_LinkCard_PandemicRadar_URL" = "https://corona-pandemieradar.de/en";

src/xcode/ENA/ENA/Resources/Localization/tr.lproj/Localizable.links.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,5 @@
6969
"ExposureSubmission_WarnWithoutTAN_FAQLink" = "https://www.coronawarn.app/en/faq/results/#warn_without_tan";
7070

7171
"Home_EndOfLifeThankYouTile_FAQLink" = "https://www.coronawarn.app/en/faq/#ramp_down";
72+
73+
"Home_LinkCard_PandemicRadar_URL" = "https://corona-pandemieradar.de/en";

src/xcode/ENA/ENA/Source/Scenes/AppInformation/AppInformationViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class AppInformationViewController: DynamicTableViewController, NavigationBarOpa
147147

148148
switch Category(rawValue: indexPath.row) {
149149
// Hibernation: hide the following cells
150-
case .about, .contact, .errorReport:
150+
case .contact, .errorReport:
151151
return 0
152152
default:
153153
return UITableView.automaticDimension

src/xcode/ENA/ENA/Source/Scenes/AppInformation/AppInformationViewControllerTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ class AppInformationViewControllerTests: XCTestCase {
9393

9494
// THEN
9595
switch category {
96-
case .contact, .errorReport, .about:
96+
case .contact, .errorReport:
9797
XCTAssertEqual(heightForRow, 0)
98-
case .accessibility, .imprint, .legal, .privacy, .terms, .versionInfo:
98+
case .accessibility, .about, .imprint, .legal, .privacy, .terms, .versionInfo:
9999
XCTAssertEqual(heightForRow, UITableView.automaticDimension)
100100
}
101101
}

src/xcode/ENA/ENA/Source/Scenes/HealthCertificates/Overview/HealthCertificateOverviewViewController.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,13 @@ class HealthCertificateOverviewViewController: UITableViewController {
282282
fatalError("Could not dequeue OverviewLabelTableCell")
283283
}
284284

285-
cell.configure(text: AppStrings.HealthCertificate.Overview.scanningInfo, color: .enaColor(for: .textPrimary2), textAlignment: textAlignment)
285+
if !CWAHibernationProvider.shared.isHibernationState {
286+
cell.configure(
287+
text: AppStrings.HealthCertificate.Overview.scanningInfo,
288+
color: .enaColor(for: .textPrimary2),
289+
textAlignment: textAlignment
290+
)
291+
}
286292
return cell
287293
}
288294

src/xcode/ENA/ENA/Source/Scenes/Home/Cells/Statistics/HomeStatisticsCellModel.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ class HomeStatisticsCellModel {
2323
statistics.keyFigureCards.first { $0.header.cardID == cardID }
2424
}
2525

26-
self?.linkCards = statistics.supportedLinkCardIDSequence
27-
.compactMap { cardID in
28-
statistics.linkCards.first { $0.header.cardID == cardID }
29-
}
26+
if CWAHibernationProvider.shared.isHibernationState, statistics.linkCards.isEmpty {
27+
// In hibernation, we don't have a server response, thatswhy we use the information hard coded
28+
self?.linkCards = [.mock(cardID: HomeLinkCard.bmgPandemicRadar.rawValue)]
29+
} else {
30+
self?.linkCards = statistics.supportedLinkCardIDSequence
31+
.compactMap { cardID in
32+
statistics.linkCards.first { $0.header.cardID == cardID }
33+
}
34+
}
3035
#if DEBUG
3136
if isUITesting {
3237
self?.setupMockLinkCards()

src/xcode/ENA/ENA/Source/Scenes/Home/Cells/Statistics/HomeStatisticsTableViewCell.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ class HomeStatisticsTableViewCell: UITableViewCell {
208208
@IBOutlet private weak var scrollView: UIScrollView!
209209
@IBOutlet private weak var stackView: UIStackView!
210210
@IBOutlet private weak var trailingConstraint: NSLayoutConstraint!
211+
@IBOutlet private weak var bottomConstraint: NSLayoutConstraint!
211212

212213
private var cellModel: HomeStatisticsCellModel?
213214
private var subscriptions = Set<AnyCancellable>()
@@ -311,6 +312,7 @@ class HomeStatisticsTableViewCell: UITableViewCell {
311312

312313
guard !CWAHibernationProvider.shared.isHibernationState else {
313314
trailingConstraint.constant = 12
315+
bottomConstraint.constant = 12
314316
return
315317
}
316318

src/xcode/ENA/ENA/Source/Scenes/Home/Cells/Statistics/HomeStatisticsTableViewCell.xib

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
5959
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
6060
<connections>
61+
<outlet property="bottomConstraint" destination="fhD-NG-SgH" id="KOo-8I-zKr"/>
6162
<outlet property="scrollView" destination="Baz-s9-y9N" id="SMK-kU-UM8"/>
6263
<outlet property="stackView" destination="zyc-lh-yUE" id="Uqs-gy-wdr"/>
6364
<outlet property="trailingConstraint" destination="hFj-JQ-gfN" id="jcg-VR-hR4"/>

src/xcode/ENA/ENA/Source/Scenes/Home/Cells/Statistics/__tests__/SAP_Internal_Stats_LinkCard+Mock.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44

55
extension SAP_Internal_Stats_LinkCard {
6-
static let bmgPandemicRadarURLMock: String = "https://corona-pandemieradar.de/de"
6+
static let bmgPandemicRadarURLMock: String = AppStrings.Links.pandemicRadarLink
77

88
/**
99
Returns a mocked `SAP_Internal_Stats_LinkCard`

src/xcode/ENA/ENA/Source/Scenes/Home/HomeTableViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class HomeTableViewModel {
147147
let isGlobalStatisticsNotLoaded = state.statistics.supportedStatisticsCardIDSequence.isEmpty
148148
let isLocalStatisticsNotCached = state.store.selectedLocalStatisticsRegions.isEmpty
149149

150-
if isStatisticsCell && isGlobalStatisticsNotLoaded && isLocalStatisticsNotCached {
150+
if isStatisticsCell && isGlobalStatisticsNotLoaded && isLocalStatisticsNotCached, !CWAHibernationProvider.shared.isHibernationState {
151151
Log.debug("[Autolayout] Layout issues due to preloading of statistics cell! ", log: .ui)
152152
// if this causes (further?) crashes we have to refactor the preloading of the statistics cell
153153
return 0

src/xcode/ENA/ENA/Source/View Helpers/AppStrings.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ enum AppStrings {
6060
static let coronaWarnAppStoreLink = NSLocalizedString("TicketValidation_CoronaWarnAppLink", tableName: "Localizable.links", comment: "")
6161
static let stikoVaccinationRecommendations = NSLocalizedString("Stiko_VaccinationRecommendations", tableName: "Localizable.links", comment: "")
6262
static let warnWithoutTANFAQLink = NSLocalizedString("ExposureSubmission_WarnWithoutTAN_FAQLink", tableName: "Localizable.links", comment: "")
63+
static let pandemicRadarLink = NSLocalizedString("Home_LinkCard_PandemicRadar_URL", comment: "")
6364
}
6465

6566
enum QuickActions {

0 commit comments

Comments
 (0)