ConnectionsViewModel

class ConnectionsViewModel(radioConfigRepository: RadioConfigRepository, serviceRepository: ServiceRepository, nodeRepository: NodeRepository, nodeManager: NodeManager, nodeRestartTracker: NodeRestartTracker, uiPrefs: UiPrefs, deviceHardwareRepository: DeviceHardwareRepository, firmwareReleaseRepository: FirmwareReleaseRepository, radioPrefs: RadioPrefs, notificationManager: NotificationManager) : ViewModel(source)

Constructors

Link copied to clipboard
constructor(radioConfigRepository: RadioConfigRepository, serviceRepository: ServiceRepository, nodeRepository: NodeRepository, nodeManager: NodeManager, nodeRestartTracker: NodeRestartTracker, uiPrefs: UiPrefs, deviceHardwareRepository: DeviceHardwareRepository, firmwareReleaseRepository: FirmwareReleaseRepository, radioPrefs: RadioPrefs, notificationManager: NotificationManager)

Properties

Link copied to clipboard

Whether ourNodeInfo belongs to the active transport session rather than cached state from an earlier session. Warning presentation uses this boundary so a non-null repository node alone cannot make configuration actionable.

Link copied to clipboard
Link copied to clipboard

Single source of truth for the UI's connection lifecycle label. Kept independent from configuration state so region, lockdown, and managed-mode changes cannot rewrite a transient connection label.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val localConfig: StateFlow<LocalConfig>
Link copied to clipboard
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.

Link copied to clipboard
val txDisabled: StateFlow<Boolean>

Whether the device is configured not to transmit. Null-safe against the pre-config LocalConfig so the notice cannot flash before the device's config arrives.

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