mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor(service): unify dual connectionState flows into single source of truth (#5077)
This commit is contained in:
parent
5e44cbd3a9
commit
9468bc6ebe
12 changed files with 103 additions and 8 deletions
|
|
@ -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>
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue