summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJon Petersson <jon.petersson@kvadrat.se>2024-04-16 11:18:35 +0200
committerBug Magnet <marco.nikic@mullvad.net>2024-04-16 11:50:39 +0200
commit25ea585ba1b1b06830ae1dd30e04e34e21b3b246 (patch)
tree5e20c6364078d908849b56c369148b44d460880b
parent6fdc65395572d915af3275b96c9bce7aaaa156f9 (diff)
downloadmullvadvpn-25ea585ba1b1b06830ae1dd30e04e34e21b3b246.tar.xz
mullvadvpn-25ea585ba1b1b06830ae1dd30e04e34e21b3b246.zip
Limit the name of a custom list to 30 characters
-rw-r--r--ios/MullvadVPN/Coordinators/CustomLists/CustomListCellConfiguration.swift1
-rw-r--r--ios/MullvadVPN/View controllers/SelectLocation/LocationCell.swift5
2 files changed, 3 insertions, 3 deletions
diff --git a/ios/MullvadVPN/Coordinators/CustomLists/CustomListCellConfiguration.swift b/ios/MullvadVPN/Coordinators/CustomLists/CustomListCellConfiguration.swift
index b1db9122eb..4731a74cc8 100644
--- a/ios/MullvadVPN/Coordinators/CustomLists/CustomListCellConfiguration.swift
+++ b/ios/MullvadVPN/Coordinators/CustomLists/CustomListCellConfiguration.swift
@@ -75,6 +75,7 @@ struct CustomListCellConfiguration {
contentConfiguration.setPlaceholder(type: .required)
contentConfiguration.textFieldProperties = .withSmartFeaturesDisabled()
contentConfiguration.inputText = subject.value.name
+ contentConfiguration.maxLength = 30
contentConfiguration.editingEvents.onChange = subject.bindTextAction(to: \.name)
cell.contentConfiguration = contentConfiguration
diff --git a/ios/MullvadVPN/View controllers/SelectLocation/LocationCell.swift b/ios/MullvadVPN/View controllers/SelectLocation/LocationCell.swift
index d68417f4c3..63ff5bcaee 100644
--- a/ios/MullvadVPN/View controllers/SelectLocation/LocationCell.swift
+++ b/ios/MullvadVPN/View controllers/SelectLocation/LocationCell.swift
@@ -20,9 +20,8 @@ class LocationCell: UITableViewCell {
let label = UILabel()
label.font = UIFont.systemFont(ofSize: 16)
label.textColor = .white
- label.lineBreakMode = .byWordWrapping
- label.numberOfLines = 0
- label.lineBreakStrategy = []
+ label.lineBreakMode = .byTruncatingTail
+ label.numberOfLines = 1
return label
}()