Skip to content

Commit

Permalink
Make changes from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
acb-mv committed Nov 18, 2024
1 parent 2a9e656 commit 22921e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ struct UDPTCPObfuscationSettingsView<VM>: View where VM: UDPTCPObfuscationSettin
}

#Preview {
var model = MockUDPTCPObfuscationSettingsViewModel(udpTcpPort: .port5001)
let model = MockUDPTCPObfuscationSettingsViewModel(udpTcpPort: .port5001)
return UDPTCPObfuscationSettingsView(viewModel: model)
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ struct SingleChoiceList<Item>: 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))
Expand All @@ -42,7 +42,7 @@ struct SingleChoiceList<Item>: View where Item: Hashable {
)
.foregroundColor(Color(UIColor.Cell.titleTextColor))
.onTapGesture {
value.wrappedValue = v
value.wrappedValue = item
}
}

Expand All @@ -59,6 +59,7 @@ struct SingleChoiceList<Item>: View where Item: Hashable {
}
Spacer()
}
.padding(EdgeInsets(top: 24, leading: 0, bottom: 0, trailing: 0))
.background(Color(.secondaryColor))
.foregroundColor(Color(.primaryTextColor))
}
Expand Down

0 comments on commit 22921e2

Please sign in to comment.