refactor(service): unify dual connectionState flows into single source of truth (#5077)

This commit is contained in:
James Rich 2026-04-11 19:50:52 -05:00 committed by GitHub
parent 5e44cbd3a9
commit 9468bc6ebe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 103 additions and 8 deletions

View file

@ -28,7 +28,16 @@ import org.meshtastic.proto.ClientNotification
*/
@Suppress("TooManyFunctions")
interface RadioController {
/** Reactive connection state of the radio. */
/**
* Canonical app-level connection state, delegated from [ServiceRepository][connectionState].
*
* This exposes the same single source of truth as `ServiceRepository.connectionState`, surfaced through the
* controller interface for convenience in feature modules and ViewModels that depend on [RadioController] rather
* than [ServiceRepository] directly.
*
* This is **not** the transport-level state it reflects the fully reconciled app-level state including handshake
* progress and device sleep policy.
*/
val connectionState: StateFlow<ConnectionState>
/**