mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
linter updates
This commit is contained in:
parent
a4d5aefca3
commit
3dcec505ff
7 changed files with 46 additions and 77 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue