mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
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:
+2
-1
@@ -13,6 +13,7 @@ struct NotificationSettingsScreenCoordinatorParameters {
|
||||
let userSession: UserSessionProtocol
|
||||
let userNotificationCenter: UserNotificationCenterProtocol
|
||||
let isModallyPresented: Bool
|
||||
let appSettings: AppSettings
|
||||
}
|
||||
|
||||
enum NotificationSettingsScreenCoordinatorAction {
|
||||
@@ -36,7 +37,7 @@ final class NotificationSettingsScreenCoordinator: CoordinatorProtocol {
|
||||
init(parameters: NotificationSettingsScreenCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
|
||||
viewModel = NotificationSettingsScreenViewModel(appSettings: ServiceLocator.shared.settings,
|
||||
viewModel = NotificationSettingsScreenViewModel(appSettings: parameters.appSettings,
|
||||
userNotificationCenter: parameters.userNotificationCenter,
|
||||
notificationSettingsProxy: parameters.userSession.clientProxy.notificationSettings,
|
||||
isModallyPresented: parameters.isModallyPresented)
|
||||
|
||||
Reference in New Issue
Block a user