diff --git a/ios/MullvadVPN/View controllers/Settings/Obfuscation/UDPTCPObfuscationSettingsView.swift b/ios/MullvadVPN/View controllers/Settings/Obfuscation/UDPTCPObfuscationSettingsView.swift index 0ba01c12bb8e..70769d71eef7 100644 --- a/ios/MullvadVPN/View controllers/Settings/Obfuscation/UDPTCPObfuscationSettingsView.swift +++ b/ios/MullvadVPN/View controllers/Settings/Obfuscation/UDPTCPObfuscationSettingsView.swift @@ -34,6 +34,6 @@ struct UDPTCPObfuscationSettingsView: View where VM: UDPTCPObfuscationSettin } #Preview { - var model = MockUDPTCPObfuscationSettingsViewModel(udpTcpPort: .port5001) + let model = MockUDPTCPObfuscationSettingsViewModel(udpTcpPort: .port5001) return UDPTCPObfuscationSettingsView(viewModel: model) } diff --git a/ios/MullvadVPN/View controllers/Settings/SwiftUI components/SingleChoiceList.swift b/ios/MullvadVPN/View controllers/Settings/SwiftUI components/SingleChoiceList.swift index 694709c09ced..6077539b5d28 100644 --- a/ios/MullvadVPN/View controllers/Settings/SwiftUI components/SingleChoiceList.swift +++ b/ios/MullvadVPN/View controllers/Settings/SwiftUI components/SingleChoiceList.swift @@ -26,12 +26,12 @@ struct SingleChoiceList: View where Item: Hashable { self.itemDescription = itemDescription ?? { "\($0)" } } - func row(_ v: Item) -> some View { - let isSelected = value.wrappedValue == v + func row(_ item: Item) -> some View { + let isSelected = value.wrappedValue == item return HStack { Image(uiImage: UIImage(resource: .iconTick)).opacity(isSelected ? 1.0 : 0.0) Spacer().frame(width: UIMetrics.SettingsCell.selectableSettingsCellLeftViewSpacing) - Text(verbatim: itemDescription(v)) + Text(verbatim: itemDescription(item)) Spacer() } .padding(EdgeInsets(UIMetrics.SettingsCell.layoutMargins)) @@ -42,7 +42,7 @@ struct SingleChoiceList: View where Item: Hashable { ) .foregroundColor(Color(UIColor.Cell.titleTextColor)) .onTapGesture { - value.wrappedValue = v + value.wrappedValue = item } } @@ -59,6 +59,7 @@ struct SingleChoiceList: View where Item: Hashable { } Spacer() } + .padding(EdgeInsets(top: 24, leading: 0, bottom: 0, trailing: 0)) .background(Color(.secondaryColor)) .foregroundColor(Color(.primaryTextColor)) }