Remove all uses of the ServiceLocator from within Coordinators and View Models.

It is still used for mocks in tests, previews etc, and still used in the AppCoordinator.
This commit is contained in:
Doug
2025-08-27 16:05:49 +01:00
committed by Doug
parent dfb2425240
commit cb7d11fd13
23 changed files with 138 additions and 69 deletions
@@ -22,9 +22,9 @@ final class DeveloperOptionsScreenCoordinator: CoordinatorProtocol {
actionsSubject.eraseToAnyPublisher()
}
init() {
viewModel = DeveloperOptionsScreenViewModel(developerOptions: ServiceLocator.shared.settings,
elementCallBaseURL: ServiceLocator.shared.settings.elementCallBaseURL)
init(appSettings: AppSettings) {
viewModel = DeveloperOptionsScreenViewModel(developerOptions: appSettings,
elementCallBaseURL: appSettings.elementCallBaseURL)
viewModel.actions
.sink { [weak self] action in