From 25ea585ba1b1b06830ae1dd30e04e34e21b3b246 Mon Sep 17 00:00:00 2001 From: Jon Petersson Date: Tue, 16 Apr 2024 11:18:35 +0200 Subject: [PATCH] Limit the name of a custom list to 30 characters --- .../CustomLists/CustomListCellConfiguration.swift | 1 + .../View controllers/SelectLocation/LocationCell.swift | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/MullvadVPN/Coordinators/CustomLists/CustomListCellConfiguration.swift b/ios/MullvadVPN/Coordinators/CustomLists/CustomListCellConfiguration.swift index b1db9122eb6c..4731a74cc890 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 d68417f4c30d..63ff5bcaeede 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 }()