mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 17:05:19 +00:00
Notes icon: force a one-shot location refresh before (re)subscribing the counter so icon turns blue immediately on current 8-cell
This commit is contained in:
@@ -1518,6 +1518,10 @@ extension ContentView {
|
|||||||
private func updateNotesCounterSubscription() {
|
private func updateNotesCounterSubscription() {
|
||||||
switch locationManager.selectedChannel {
|
switch locationManager.selectedChannel {
|
||||||
case .mesh:
|
case .mesh:
|
||||||
|
// Ensure we have a fresh one-shot location fix so building geohash is current
|
||||||
|
if locationManager.permissionState == .authorized {
|
||||||
|
LocationChannelManager.shared.refreshChannels()
|
||||||
|
}
|
||||||
if let building = LocationChannelManager.shared.availableChannels.first(where: { $0.level == .building })?.geohash {
|
if let building = LocationChannelManager.shared.availableChannels.first(where: { $0.level == .building })?.geohash {
|
||||||
LocationNotesCounter.shared.subscribe(geohash: building)
|
LocationNotesCounter.shared.subscribe(geohash: building)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user