Skip to content

Commit

Permalink
Fix #6014: Allow etp title to span multiple lines
Browse files Browse the repository at this point in the history
  • Loading branch information
dnarcese committed Feb 12, 2020
1 parent 002cd0b commit 86e39be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private struct PhotonActionSheetCellUX {

class PhotonActionSheetCell: UITableViewCell {
static let Padding: CGFloat = 16
static let HorizontalPadding: CGFloat = 10
static let HorizontalPadding: CGFloat = 1
static let VerticalPadding: CGFloat = 2
static let IconSize = 16

Expand Down Expand Up @@ -176,7 +176,7 @@ class PhotonActionSheetCell: UITableViewCell {
titleLabel.text = action.title
titleLabel.textColor = UIColor.theme.tableView.rowText
titleLabel.textColor = action.accessory == .Text ? titleLabel.textColor.withAlphaComponent(0.6) : titleLabel.textColor
titleLabel.numberOfLines = 1
titleLabel.lineBreakMode = .byWordWrapping
titleLabel.adjustsFontSizeToFitWidth = true
titleLabel.minimumScaleFactor = 0.5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ extension PhotonActionSheetProtocol {
self.showDomainTable(title: action.title, description: desc, blocker: blocker, categories: [BlocklistCategory.cryptomining])
}

var addToWhitelist = PhotonActionSheetItem(title: Strings.TPBlockingSiteEnabled, isEnabled: !isWhitelisted, accessory: .Switch) { _, cell in
var addToWhitelist = PhotonActionSheetItem(title: Strings.ETPOn, isEnabled: !isWhitelisted, accessory: .Switch) { _, cell in
LeanPlumClient.shared.track(event: .trackingProtectionWhiteList)
UnifiedTelemetry.recordEvent(category: .action, method: .add, object: .trackingProtectionWhitelist)
ContentBlocker.shared.whitelist(enable: tab.contentBlocker?.status != .Whitelisted, url: currentURL) {
Expand All @@ -174,9 +174,9 @@ extension PhotonActionSheetProtocol {
}
addToWhitelist.customRender = { title, _ in
if tab.contentBlocker?.status == .Whitelisted {
title.text = Strings.TPBlockingSiteDisabled
title.text = Strings.ETPOff
} else {
title.text = Strings.TPBlockingSiteEnabled
title.text = Strings.ETPOn
}
}
addToWhitelist.accessibilityId = "tp.add-to-whitelist"
Expand Down

0 comments on commit 86e39be

Please sign in to comment.