mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-06-01 18:50:43 -04:00
Apply Interface Segregation Principle to ServiceRepository and RadioController consumers: New interfaces extracted from ServiceRepository: - ConnectionStateProvider: read-only connectionState access - TracerouteResponseProvider: traceroute response state + clear - NeighborInfoResponseProvider: neighbor info response state + clear - ServiceStateWriter: write-side for handlers (set*, emit*, clear*) RadioController now extends ConnectionStateProvider, and sub-controller interfaces (AdminController, MessagingController, NodeController, RequestController) are bound in DI for fine-grained injection. ViewModel narrowing: - MessageViewModel: RadioController+ServiceRepository → MessagingController+ConnectionStateProvider - NodeDetailViewModel: RadioController → RequestController - NodeListViewModel: RadioController+ServiceRepository → AdminController+ConnectionStateProvider - ContactsViewModel: ServiceRepository → ConnectionStateProvider - MetricsViewModel: ServiceRepository → TracerouteResponseProvider All tests updated to use narrowed interfaces. Koin DI bindings updated for both Android (@Single binds) and Desktop (manual single<> declarations). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>