mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Periphery cleanup (#5893)
This commit is contained in:
@@ -12,7 +12,6 @@ import SwiftUI
|
||||
struct SpacesScreenCoordinatorParameters {
|
||||
let userSession: UserSessionProtocol
|
||||
let selectedSpacePublisher: CurrentValuePublisher<String?, Never>
|
||||
let appSettings: AppSettings
|
||||
let userIndicatorController: UserIndicatorControllerProtocol
|
||||
}
|
||||
|
||||
@@ -23,7 +22,6 @@ enum SpacesScreenCoordinatorAction {
|
||||
}
|
||||
|
||||
final class SpacesScreenCoordinator: CoordinatorProtocol {
|
||||
private let parameters: SpacesScreenCoordinatorParameters
|
||||
private let viewModel: SpacesScreenViewModelProtocol
|
||||
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
@@ -34,11 +32,8 @@ final class SpacesScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
init(parameters: SpacesScreenCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
|
||||
viewModel = SpacesScreenViewModel(userSession: parameters.userSession,
|
||||
selectedSpacePublisher: parameters.selectedSpacePublisher,
|
||||
appSettings: parameters.appSettings,
|
||||
userIndicatorController: parameters.userIndicatorController)
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ typealias SpacesScreenViewModelType = StateStoreViewModelV2<SpacesScreenViewStat
|
||||
|
||||
class SpacesScreenViewModel: SpacesScreenViewModelType, SpacesScreenViewModelProtocol {
|
||||
private let spaceServiceProxy: SpaceServiceProxyProtocol
|
||||
private let appSettings: AppSettings
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
|
||||
private let actionsSubject: PassthroughSubject<SpacesScreenViewModelAction, Never> = .init()
|
||||
@@ -23,10 +22,8 @@ class SpacesScreenViewModel: SpacesScreenViewModelType, SpacesScreenViewModelPro
|
||||
|
||||
init(userSession: UserSessionProtocol,
|
||||
selectedSpacePublisher: CurrentValuePublisher<String?, Never>,
|
||||
appSettings: AppSettings,
|
||||
userIndicatorController: UserIndicatorControllerProtocol) {
|
||||
spaceServiceProxy = userSession.clientProxy.spaceService
|
||||
self.appSettings = appSettings
|
||||
self.userIndicatorController = userIndicatorController
|
||||
|
||||
super.init(initialViewState: SpacesScreenViewState(userProfile: userSession.clientProxy.userProfilePublisher.value,
|
||||
|
||||
@@ -151,7 +151,6 @@ struct SpacesScreen_Previews: PreviewProvider, TestablePreview {
|
||||
|
||||
return SpacesScreenViewModel(userSession: UserSessionMock(.init(clientProxy: clientProxy)),
|
||||
selectedSpacePublisher: .init(nil),
|
||||
appSettings: appSettings,
|
||||
userIndicatorController: UserIndicatorControllerMock())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user