ConnectionsViewModel

class ConnectionsViewModel(radioConfigRepository: RadioConfigRepository, serviceRepository: ServiceRepository, nodeRepository: NodeRepository, uiPrefs: UiPrefs) : ViewModel(source)

Constructors

Link copied to clipboard
constructor(radioConfigRepository: RadioConfigRepository, serviceRepository: ServiceRepository, nodeRepository: NodeRepository, uiPrefs: UiPrefs)

Properties

Link copied to clipboard
Link copied to clipboard

Single source of truth for the UI's "connection status" pill/banner. Derived from connectionState and regionUnset; kept here rather than in the composable so the mapping is observable and testable.

Link copied to clipboard
Link copied to clipboard
val localConfig: StateFlow<LocalConfig>
Link copied to clipboard
val myNodeInfo: StateFlow<MyNodeInfo?>
Link copied to clipboard
val ourNodeForDisplay: StateFlow<Node?>

Filtered ourNodeInfo that only emits when display-relevant fields change, preventing continuous recomposition from lastHeard/snr updates.

Link copied to clipboard
val ourNodeInfo: StateFlow<Node?>
Link copied to clipboard
val regionUnset: StateFlow<Boolean>

Whether the LoRa region is UNSET and needs to be configured.

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard