mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Localize unknown
This commit is contained in:
parent
1a1cd719a2
commit
7c7bcda7c6
13 changed files with 40 additions and 64 deletions
|
|
@ -118,20 +118,6 @@ public struct MapView: UIViewRepresentable {
|
|||
mapView.delegate = context.coordinator
|
||||
mapView.register(PositionAnnotationView.self, forAnnotationViewWithReuseIdentifier: NSStringFromClass(PositionAnnotationView.self))
|
||||
|
||||
/*Timer.scheduledTimer(withTimeInterval: 10, repeats: true) { timer in
|
||||
for node in self.locationNodes {
|
||||
// try and get the last position
|
||||
if (node.positions?.count ?? 0) > 0 && (node.positions!.lastObject as! PositionEntity).coordinate != nil {
|
||||
let annotation = PositionAnnotation()
|
||||
annotation.coordinate = (node.positions!.lastObject as! PositionEntity).coordinate!
|
||||
annotation.title = node.user?.longName ?? "Unknown"
|
||||
annotation.shortName = node.user?.shortName?.uppercased() ?? "???"
|
||||
|
||||
mapView.addAnnotation(annotation)
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
return mapView
|
||||
}
|
||||
|
||||
|
|
@ -229,18 +215,6 @@ public struct MapView: UIViewRepresentable {
|
|||
} else {
|
||||
shouldMoveRegion = true
|
||||
}
|
||||
|
||||
/*for node in self.locationNodes {
|
||||
// try and get the last position
|
||||
if (node.positions?.count ?? 0) > 0 && (node.positions!.lastObject as! PositionEntity).coordinate != nil {
|
||||
let annotation = PositionAnnotation()
|
||||
annotation.coordinate = (node.positions!.lastObject as! PositionEntity).coordinate!
|
||||
annotation.title = node.user?.longName ?? "Unknown"
|
||||
annotation.shortName = node.user?.shortName?.uppercased() ?? "???"
|
||||
|
||||
mapView.addAnnotation(annotation)
|
||||
}
|
||||
}*/
|
||||
|
||||
var displayedNodes: [Int64] = []
|
||||
for position in self.positions {
|
||||
|
|
@ -250,7 +224,7 @@ public struct MapView: UIViewRepresentable {
|
|||
|
||||
let annotation = PositionAnnotation()
|
||||
annotation.coordinate = position.coordinate!
|
||||
annotation.title = position.nodePosition!.user?.longName ?? "Unknown"
|
||||
annotation.title = position.nodePosition!.user?.longName ?? NSLocalizedString("unknown", comment: "Unknown")
|
||||
annotation.shortName = position.nodePosition!.user?.shortName?.uppercased() ?? "???"
|
||||
|
||||
mapView.addAnnotation(annotation)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue