Skip to content

Commit 003eb14

Browse files
committed
Fix #1525 adjust margin before layout
1 parent 037ebe6 commit 003eb14

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

Loop/View Controllers/DosingStrategySelectionViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class DosingStrategySelectionViewController: UITableViewController, Identifiable
6767
let cell = tableView.dequeueReusableCell(withIdentifier: TitleSubtitleTextFieldTableViewCell.className, for: indexPath) as! TitleSubtitleTextFieldTableViewCell
6868
let isSelected = strategy == dosingStrategy
6969
cell.tintColor = isSelected ? nil : .clear
70-
cell.titleLabel.text = strategy.title
70+
cell.titleLabel.text = strategy.fullTitle
7171
cell.subtitleLabel.text = strategy.subtitle
7272
return cell
7373
}

Loop/Views/PredictionInputEffectTableViewCell.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ class PredictionInputEffectTableViewCell: UITableViewCell {
1414

1515
@IBOutlet weak var subtitleLabel: UILabel!
1616

17-
override func layoutSubviews() {
18-
super.layoutSubviews()
19-
20-
contentView.layoutMargins.left = separatorInset.left
17+
override func didMoveToSuperview() {
18+
super.didMoveToSuperview()
2119
contentView.layoutMargins.right = separatorInset.left
2220
}
23-
21+
2422
var enabled: Bool = true {
2523
didSet {
2624
if enabled {

LoopCore/LoopSettings.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,16 @@ public extension DosingStrategy {
2222
return NSLocalizedString("Automatic Bolus", comment: "Title string for automatic bolus dosing strategy")
2323
}
2424
}
25-
25+
26+
var fullTitle: String {
27+
switch self {
28+
case .automaticBolus:
29+
return NSLocalizedString("Automatic Bolus (Experimental)", comment: "Title string for automatic bolus dosing strategy")
30+
default:
31+
return title
32+
}
33+
}
34+
2635
var subtitle: String {
2736
switch self {
2837
case .tempBasalOnly:

0 commit comments

Comments
 (0)