Location notes: show block name (from reverse geocode) in header instead of 'street-level notes'

This commit is contained in:
jack
2025-09-13 11:35:23 +02:00
parent eb63a62590
commit b7e76e6da4
+4 -1
View File
@@ -6,6 +6,7 @@ struct LocationNotesView: View {
let geohash: String let geohash: String
@Environment(\.colorScheme) var colorScheme @Environment(\.colorScheme) var colorScheme
@ObservedObject private var locationManager = LocationChannelManager.shared
@Environment(\.dismiss) private var dismiss @Environment(\.dismiss) private var dismiss
@State private var draft: String = "" @State private var draft: String = ""
@@ -43,10 +44,12 @@ struct LocationNotesView: View {
VStack(alignment: .leading, spacing: 2) { VStack(alignment: .leading, spacing: 2) {
Text("notes @ #\(geohash)") Text("notes @ #\(geohash)")
.font(.system(size: 16, weight: .bold, design: .monospaced)) .font(.system(size: 16, weight: .bold, design: .monospaced))
Text("street-level notes") if let blockName = locationManager.locationNames[.block], !blockName.isEmpty {
Text(blockName)
.font(.system(size: 12, design: .monospaced)) .font(.system(size: 12, design: .monospaced))
.foregroundColor(secondaryTextColor) .foregroundColor(secondaryTextColor)
} }
}
Spacer() Spacer()
Button(action: { dismiss() }) { Button(action: { dismiss() }) {
Image(systemName: "xmark") Image(systemName: "xmark")