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

Commit 38d6f50

Browse files
Merge pull request #376 from admin-ch/bugfix/fixes-news-title
fixes verifier info title label
2 parents d717d6f + e365e80 commit 38d6f50

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

CovidCertificate/SharedUI/Controls/LeadingTrailingIconButton.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ class LeadingTrailingIconButton: UBButton {
1818
private let trailingImageView = UIImageView()
1919
private let textLabel = Label(.textBold, textColor: .cc_blue)
2020

21+
var text: String? {
22+
didSet {
23+
textLabel.text = text
24+
}
25+
}
26+
2127
// MARK: Init
2228

2329
init(text: String, leadingIcon: UIImage? = nil, trailingIcon: UIImage?, hasBorder: Bool = true) {

Verifier/Screens/Homescreen/VerifierHomescreenViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class VerifierHomescreenViewController: HomescreenBaseViewController {
3838
private var modePopupIsShown: Bool = false
3939

4040
private let infoButtonContainerView = UIView()
41-
private let infoButton = LeadingTrailingIconButton(text: "Zertifikatspflicht aufgehoben", trailingIcon: UIImage(named: "ic-info-outline")?.ub_image(with: .cc_blue), hasBorder: false)
41+
private let infoButton = LeadingTrailingIconButton(text: "", trailingIcon: UIImage(named: "ic-info-outline")?.ub_image(with: .cc_blue), hasBorder: false)
4242
private var infoPopupView: IconTextInfoBoxView?
4343

4444
private var mode: CheckModeUIObject?
@@ -104,6 +104,8 @@ class VerifierHomescreenViewController: HomescreenBaseViewController {
104104
make.left.greaterThanOrEqualToSuperview()
105105
}
106106

107+
infoButtonContainerView.ub_setHidden(true)
108+
107109
titleInfoStackView.addArrangedViewCentered(infoButtonContainerView)
108110

109111
view.addSubview(bottomView)
@@ -217,6 +219,7 @@ class VerifierHomescreenViewController: HomescreenBaseViewController {
217219
hasInfoButton = config.hasNews
218220
}
219221

222+
infoButton.text = ConfigManager.currentConfig?.covidCertificateNewsText?.value
220223
infoButtonContainerView.ub_setHidden(!hasInfoButton)
221224

222225
if shouldShowNewsInfoBox() {

0 commit comments

Comments
 (0)