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 #4841 from corona-warn-app/fix/14127-pandamic-butt…
Browse files Browse the repository at this point in the history
…on-ui-Issues

Fix/14127 Pandemic radar button UI issues
  • Loading branch information
naveeddotio authored Oct 14, 2022
2 parents 0b4c835 + aca2fc0 commit 4288a26
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"filename" : "export_icon.pdf",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "dark export.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,7 @@ class HomeLinkCardViewModel {

private let buttonTitleAttributedString: NSAttributedString = {
let textAttachment = NSTextAttachment()
if #available(iOS 13.0, *) {
textAttachment.image = UIImage(
systemName: "rectangle.portrait.and.arrow.right",
withConfiguration: UIImage.SymbolConfiguration(weight: .semibold)
)?.withTintColor(
.enaColor(for: .buttonPrimary),
renderingMode: .alwaysOriginal
)
} else {
// to.do
// Fallback iOS 12
// UIImage(named: "Icons_Link")
}

textAttachment.image = UIImage(named: "export_icon")
let textString = NSMutableAttributedString(
string: "\(AppStrings.Statistics.Card.LinkCard.buttonTitle) ",
attributes: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,9 @@ class HomeLinkCardViewModelTests: XCTestCase {

let buttonTitleImage = buttonTitle.attachmentImage
XCTAssertNotNil(buttonTitleImage)

if #available(iOS 13.0, *) {
let buttonTitleImageSFSymbol = UIImage(
systemName: "rectangle.portrait.and.arrow.right",
withConfiguration: UIImage.SymbolConfiguration(weight: .semibold)
)?.withTintColor(
.enaColor(for: .buttonPrimary),
renderingMode: .alwaysOriginal
)

XCTAssertEqual(buttonTitleImage, buttonTitleImageSFSymbol)
}

let buttonTitleImageSFSymbol = UIImage(named: "export_icon")
XCTAssertEqual(buttonTitleImage, buttonTitleImageSFSymbol)
}

func testButtonURL_pandemicRadar() {
Expand Down

0 comments on commit 4288a26

Please sign in to comment.