UI geohash notifications (#325)

* location name in notifications

* remove tests

* panic nostr

* mentions with hashes, otherwise none

* fix timestamps

* parse geohashes in messages

* works

* fix country name

* mention notifications work
This commit is contained in:
callebtc
2025-08-28 17:47:47 +02:00
committed by GitHub
parent 3ea2aed9a4
commit 550520795f
12 changed files with 393 additions and 34 deletions
@@ -456,6 +456,31 @@ class NostrRelayManager private constructor() {
}
}
/**
* Clear all subscription tracking, message handlers, routing caches, and queued messages.
* Intended for panic/reset flows prior to reconnecting and re-subscribing from scratch.
*/
fun clearAllSubscriptions() {
try {
// Clear persistent subscription tracking
activeSubscriptions.clear()
messageHandlers.clear()
subscriptions.clear()
// Clear routing caches (per-geohash relay selections)
geohashToRelays.clear()
// Clear any queued messages waiting to be sent
synchronized(messageQueueLock) {
messageQueue.clear()
}
Log.i(TAG, "🧹 Cleared all Nostr subscriptions and routing caches")
} catch (e: Exception) {
Log.e(TAG, "Failed to clear subscriptions: ${e.message}")
}
}
/**
* Get detailed status for all relays
*/