Merge be81ddefe065c08a343fe8dc4266293f8d29cc63 into 945c9e025be1c3ea08db76398893c640452bcd20

This commit is contained in:
Taksh Kothari 2026-09-08 13:25:01 +03:00 committed by GitHub
commit 5c9d4edd8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,10 +64,17 @@ class GeohashRepository(
// peerID alias -> nostr pubkey mapping for geohash DMs and temp aliases
private val nostrKeyMapping: MutableMap<String, String> = mutableMapOf()
// Current geohash in view
// Current geohash in view. Written from the UI thread when the user picks
// a channel and read from Nostr handler and timer threads - including from
// the @Synchronized methods below, which only see a published write if the
// write itself is synchronized. NotificationManager marks its copy of this
// state @Volatile for the same reason.
private var currentGeohash: String? = null
@Synchronized
fun setCurrentGeohash(geo: String?) { currentGeohash = geo }
@Synchronized
fun getCurrentGeohash(): String? = currentGeohash
@Synchronized