linter updates

This commit is contained in:
Garth Vander Houwen 2024-10-05 16:35:42 -07:00
parent a4d5aefca3
commit 3dcec505ff
7 changed files with 46 additions and 77 deletions

View file

@ -65,14 +65,14 @@ struct WaypointForm: View {
axis: .vertical
)
.foregroundColor(Color.gray)
.onChange(of: name, perform: { _ in
.onChange(of: name) {
var totalBytes = name.utf8.count
// Only mess with the value if it is too big
while totalBytes > 30 {
name = String(name.dropLast())
totalBytes = name.utf8.count
}
})
}
}
HStack {
Text("Description")
@ -83,14 +83,14 @@ struct WaypointForm: View {
axis: .vertical
)
.foregroundColor(Color.gray)
.onChange(of: description, perform: { _ in
.onChange(of: description) {
var totalBytes = description.utf8.count
// Only mess with the value if it is too big
while totalBytes > 100 {
description = String(description.dropLast())
totalBytes = description.utf8.count
}
})
}
}
HStack {
Text("Icon")