Refactors cleanup (#372)

* cleanup peermanager

* cleanup geohash code

* direct connections fix

* pow display

* track disconnects too

* display pow only if enabled

* display pow only if enabled

* direct connection tracking
This commit is contained in:
callebtc
2025-09-02 22:09:44 +02:00
committed by GitHub
parent bbf5918896
commit 8b3dc71dc6
13 changed files with 181 additions and 147 deletions
@@ -103,6 +103,10 @@ class ChatState {
private val _peerRSSI = MutableLiveData<Map<String, Int>>(emptyMap())
val peerRSSI: LiveData<Map<String, Int>> = _peerRSSI
// Direct connection status per peer (for live UI updates)
private val _peerDirect = MutableLiveData<Map<String, Boolean>>(emptyMap())
val peerDirect: LiveData<Map<String, Boolean>> = _peerDirect
// peerIDToPublicKeyFingerprint REMOVED - fingerprints now handled centrally in PeerManager
@@ -276,6 +280,10 @@ class ChatState {
fun setPeerRSSI(rssi: Map<String, Int>) {
_peerRSSI.value = rssi
}
fun setPeerDirect(direct: Map<String, Boolean>) {
_peerDirect.value = direct
}
fun setShowAppInfo(show: Boolean) {
_showAppInfo.value = show