diff --git a/bitchat/Views/ContentView.swift b/bitchat/Views/ContentView.swift index 10333d24..71e7de2b 100644 --- a/bitchat/Views/ContentView.swift +++ b/bitchat/Views/ContentView.swift @@ -1186,7 +1186,7 @@ struct ContentView: View { LocationChannelManager.shared.enableLocationChannels() LocationChannelManager.shared.refreshChannels() // If we already have a block geohash, pass it; otherwise wait in the sheet. - notesGeohash = LocationChannelManager.shared.availableChannels.first(where: { $0.level == .building })?.geohash + notesGeohash = LocationChannelManager.shared.availableChannels.first(where: { $0.level == .block })?.geohash showLocationNotes = true }) { HStack(alignment: .center, spacing: 4) { @@ -1240,7 +1240,7 @@ struct ContentView: View { } .sheet(isPresented: $showLocationNotes) { Group { - if let gh = notesGeohash ?? LocationChannelManager.shared.availableChannels.first(where: { $0.level == .building })?.geohash { + if let gh = notesGeohash ?? LocationChannelManager.shared.availableChannels.first(where: { $0.level == .block })?.geohash { LocationNotesView(geohash: gh, onNotesCountChanged: { cnt in sheetNotesCount = cnt }) .environmentObject(viewModel) } else { @@ -1286,7 +1286,7 @@ struct ContentView: View { sheetNotesCount = 0 } .onChange(of: locationManager.availableChannels) { channels in - if let current = channels.first(where: { $0.level == .building })?.geohash, + if let current = channels.first(where: { $0.level == .block })?.geohash, notesGeohash != current { notesGeohash = current #if os(iOS) @@ -1530,8 +1530,8 @@ extension ContentView { if locationManager.permissionState == .authorized { LocationChannelManager.shared.refreshChannels() } - if let building = LocationChannelManager.shared.availableChannels.first(where: { $0.level == .building })?.geohash { - LocationNotesCounter.shared.subscribe(geohash: building) + if let block = LocationChannelManager.shared.availableChannels.first(where: { $0.level == .block })?.geohash { + LocationNotesCounter.shared.subscribe(geohash: block) } else { LocationNotesCounter.shared.cancel() }