Skip to content

Commit

Permalink
Merge branch 'develop' into release/2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stmitt committed Feb 10, 2022
2 parents 5098caf + cd116be commit fa0bdb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ class NSReportsDetailExposedCheckInViewController: NSTitleViewScrollViewControll

addWhatToDoSection(title: "checkin_report_title3".ub_localized,
text: "checkin_report_subtitle3".ub_localized,
view: whiteBoxView.contentView)
view: whiteBoxView.contentView,
isHtmlContent: true)

whiteBoxView.contentView.addSpacerView(NSPadding.large)

Expand All @@ -149,14 +150,14 @@ class NSReportsDetailExposedCheckInViewController: NSTitleViewScrollViewControll
return whiteBoxView
}

private func addWhatToDoSection(title: String, text: String, view: UIStackView) {
private func addWhatToDoSection(title: String, text: String, view: UIStackView, isHtmlContent: Bool = false) {
let titleLabel = NSLabel(.textBold)
titleLabel.text = title
view.addArrangedView(titleLabel)
view.addSpacerView(2 * NSPadding.small)

let textLabel = NSLabel(.textLight)
textLabel.isHtmlContent = true
textLabel.isHtmlContent = isHtmlContent
textLabel.text = text
view.addArrangedView(textLabel)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ class NSReportsDetailExposedEncountersViewController: NSTitleViewScrollViewContr

addWhatToDoSection(title: "checkin_report_title3".ub_localized,
text: "checkin_report_subtitle3".ub_localized,
view: moduleView.contentView)
view: moduleView.contentView,
isHtmlContent: true)

moduleView.contentView.addSpacerView(NSPadding.large)
}
Expand Down Expand Up @@ -289,15 +290,15 @@ class NSReportsDetailExposedEncountersViewController: NSTitleViewScrollViewContr
moduleView.contentView.addArrangedView(phoneButton)
}

private func addWhatToDoSection(title: String, text: String, view: UIStackView) {
private func addWhatToDoSection(title: String, text: String, view: UIStackView, isHtmlContent: Bool = false) {
let titleLabel = NSLabel(.textBold)
titleLabel.text = title
view.addArrangedView(titleLabel)
view.addSpacerView(2 * NSPadding.small)
titleLabel.accessibilityTraits = [.header]

let textLabel = NSLabel(.textLight)
textLabel.isHtmlContent = true
textLabel.isHtmlContent = isHtmlContent
textLabel.text = text
view.addArrangedView(textLabel)
}
Expand Down

0 comments on commit fa0bdb5

Please sign in to comment.