Files
Meshtastic-Android/core/ui/src
James Rich b7e36a96c5 refactor: Narrow read-only connection-state consumers to ConnectionStateProvider
Following the ServiceRepository ISP decomposition, the two consumers that
only read connectionState now inject ConnectionStateProvider instead of
the full ServiceRepository:

- ConnectionsViewModel (core:ui)
- LocalStatsWidgetStateProvider (feature:widget)

The remaining three full-ServiceRepository injections are left as-is
because they use members not carried by any narrow provider:
RadioConfigViewModel (meshPacketFlow), ScannerViewModel
(connectionProgress), and UIViewModel (clientNotification + errorMessage
reads). Extracting single-consumer providers for those would be
over-segregation.

Koin graph verifies on Android + desktop; ConnectionsViewModelTest green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 14:03:30 -05:00
..