mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Removing dead code part 3 (#2264)
This commit is contained in:
+1
-2
@@ -37,8 +37,7 @@ final class RoomPollsHistoryScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
init(parameters: RoomPollsHistoryScreenCoordinatorParameters) {
|
||||
viewModel = RoomPollsHistoryScreenViewModel(roomProxy: parameters.roomProxy,
|
||||
pollInteractionHandler: parameters.pollInteractionHandler,
|
||||
viewModel = RoomPollsHistoryScreenViewModel(pollInteractionHandler: parameters.pollInteractionHandler,
|
||||
roomTimelineController: parameters.roomTimelineController,
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||
}
|
||||
|
||||
+1
-13
@@ -26,7 +26,6 @@ class RoomPollsHistoryScreenViewModel: RoomPollsHistoryScreenViewModelType, Room
|
||||
static let backPaginationEventLimit: UInt = 250
|
||||
}
|
||||
|
||||
private let roomProxy: RoomProxyProtocol
|
||||
private let pollInteractionHandler: PollInteractionHandlerProtocol
|
||||
private let roomTimelineController: RoomTimelineControllerProtocol
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
@@ -40,11 +39,9 @@ class RoomPollsHistoryScreenViewModel: RoomPollsHistoryScreenViewModelType, Room
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
init(roomProxy: RoomProxyProtocol,
|
||||
pollInteractionHandler: PollInteractionHandlerProtocol,
|
||||
init(pollInteractionHandler: PollInteractionHandlerProtocol,
|
||||
roomTimelineController: RoomTimelineControllerProtocol,
|
||||
userIndicatorController: UserIndicatorControllerProtocol) {
|
||||
self.roomProxy = roomProxy
|
||||
self.pollInteractionHandler = pollInteractionHandler
|
||||
self.roomTimelineController = roomTimelineController
|
||||
self.userIndicatorController = userIndicatorController
|
||||
@@ -189,12 +186,3 @@ class RoomPollsHistoryScreenViewModel: RoomPollsHistoryScreenViewModelType, Room
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Mocks
|
||||
|
||||
extension RoomPollsHistoryScreenViewModel {
|
||||
static let mock = RoomPollsHistoryScreenViewModel(roomProxy: RoomProxyMock(),
|
||||
pollInteractionHandler: PollInteractionHandlerMock(),
|
||||
roomTimelineController: MockRoomTimelineController(),
|
||||
userIndicatorController: UserIndicatorControllerMock())
|
||||
}
|
||||
|
||||
@@ -126,8 +126,7 @@ struct RoomPollsHistoryScreen_Previews: PreviewProvider, TestablePreview {
|
||||
roomTimelineController.timelineItems = []
|
||||
let roomProxyMockConfiguration = RoomProxyMockConfiguration(displayName: "Polls")
|
||||
roomProxyMockConfiguration.timeline.timelineStartReached = false
|
||||
let viewModel = RoomPollsHistoryScreenViewModel(roomProxy: RoomProxyMock(with: roomProxyMockConfiguration),
|
||||
pollInteractionHandler: PollInteractionHandlerMock(),
|
||||
let viewModel = RoomPollsHistoryScreenViewModel(pollInteractionHandler: PollInteractionHandlerMock(),
|
||||
roomTimelineController: roomTimelineController,
|
||||
userIndicatorController: UserIndicatorControllerMock())
|
||||
return viewModel
|
||||
@@ -150,8 +149,7 @@ struct RoomPollsHistoryScreen_Previews: PreviewProvider, TestablePreview {
|
||||
|
||||
let roomProxyMockConfiguration = RoomProxyMockConfiguration(displayName: "Polls")
|
||||
roomProxyMockConfiguration.timeline.timelineStartReached = true
|
||||
let viewModel = RoomPollsHistoryScreenViewModel(roomProxy: RoomProxyMock(with: roomProxyMockConfiguration),
|
||||
pollInteractionHandler: PollInteractionHandlerMock(),
|
||||
let viewModel = RoomPollsHistoryScreenViewModel(pollInteractionHandler: PollInteractionHandlerMock(),
|
||||
roomTimelineController: roomTimelineController,
|
||||
userIndicatorController: UserIndicatorControllerMock())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user