Skip to content

Commit 25ea585

Browse files
Jon Peterssonbuggmagnet
Jon Petersson
authored andcommitted
Limit the name of a custom list to 30 characters
1 parent 6fdc653 commit 25ea585

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ios/MullvadVPN/Coordinators/CustomLists/CustomListCellConfiguration.swift

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ struct CustomListCellConfiguration {
7575
contentConfiguration.setPlaceholder(type: .required)
7676
contentConfiguration.textFieldProperties = .withSmartFeaturesDisabled()
7777
contentConfiguration.inputText = subject.value.name
78+
contentConfiguration.maxLength = 30
7879
contentConfiguration.editingEvents.onChange = subject.bindTextAction(to: \.name)
7980

8081
cell.contentConfiguration = contentConfiguration

ios/MullvadVPN/View controllers/SelectLocation/LocationCell.swift

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ class LocationCell: UITableViewCell {
2020
let label = UILabel()
2121
label.font = UIFont.systemFont(ofSize: 16)
2222
label.textColor = .white
23-
label.lineBreakMode = .byWordWrapping
24-
label.numberOfLines = 0
25-
label.lineBreakStrategy = []
23+
label.lineBreakMode = .byTruncatingTail
24+
label.numberOfLines = 1
2625
return label
2726
}()
2827

0 commit comments

Comments
 (0)