mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Fixing Tests and deleting dead code (#2444)
This commit is contained in:
@@ -882,11 +882,11 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
|
||||
private func presentPollsHistory(roomID: String) {
|
||||
Task {
|
||||
await asyncPresentRoomPollsHistory(roomID: roomID)
|
||||
await asyncPresentRoomPollsHistory()
|
||||
}
|
||||
}
|
||||
|
||||
private func asyncPresentRoomPollsHistory(roomID: String) async {
|
||||
private func asyncPresentRoomPollsHistory() async {
|
||||
guard let roomProxy else {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ enum GlobalSearchControllerAction {
|
||||
|
||||
@MainActor
|
||||
class GlobalSearchScreenCoordinator: CoordinatorProtocol {
|
||||
private let parameters: GlobalSearchScreenCoordinatorParameters
|
||||
private let viewModel: GlobalSearchScreenViewModelProtocol
|
||||
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
@@ -41,7 +40,6 @@ class GlobalSearchScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
init(parameters: GlobalSearchScreenCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
viewModel = GlobalSearchScreenViewModel(roomSummaryProvider: parameters.roomSummaryProvider,
|
||||
imageProvider: parameters.mediaProvider)
|
||||
|
||||
|
||||
-2
@@ -21,7 +21,6 @@ typealias RoomMemberDetailsScreenViewModelType = StateStoreViewModel<RoomMemberD
|
||||
|
||||
class RoomMemberDetailsScreenViewModel: RoomMemberDetailsScreenViewModelType, RoomMemberDetailsScreenViewModelProtocol {
|
||||
private let roomProxy: RoomProxyProtocol
|
||||
private let userID: String
|
||||
private let mediaProvider: MediaProviderProtocol
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
|
||||
@@ -38,7 +37,6 @@ class RoomMemberDetailsScreenViewModel: RoomMemberDetailsScreenViewModelType, Ro
|
||||
mediaProvider: MediaProviderProtocol,
|
||||
userIndicatorController: UserIndicatorControllerProtocol) {
|
||||
self.roomProxy = roomProxy
|
||||
self.userID = userID
|
||||
self.mediaProvider = mediaProvider
|
||||
self.userIndicatorController = userIndicatorController
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ enum SettingsScreenCoordinatorAction {
|
||||
}
|
||||
|
||||
final class SettingsScreenCoordinator: CoordinatorProtocol {
|
||||
private let parameters: SettingsScreenCoordinatorParameters
|
||||
private var viewModel: SettingsScreenViewModelProtocol
|
||||
|
||||
private let actionsSubject: PassthroughSubject<SettingsScreenCoordinatorAction, Never> = .init()
|
||||
@@ -53,8 +52,6 @@ final class SettingsScreenCoordinator: CoordinatorProtocol {
|
||||
// MARK: - Setup
|
||||
|
||||
init(parameters: SettingsScreenCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
|
||||
viewModel = SettingsScreenViewModel(userSession: parameters.userSession,
|
||||
appSettings: parameters.appSettings)
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ class ClientProxy: ClientProxyProtocol {
|
||||
|
||||
clientQueue = .init(label: "ClientProxyQueue", attributes: .concurrent)
|
||||
|
||||
mediaLoader = MediaLoader(client: client, clientQueue: clientQueue)
|
||||
mediaLoader = MediaLoader(client: client)
|
||||
|
||||
notificationSettings = NotificationSettingsProxy(notificationSettings: client.getNotificationSettings(),
|
||||
backgroundTaskService: backgroundTaskService)
|
||||
@@ -159,15 +159,6 @@ class ClientProxy: ClientProxyProtocol {
|
||||
client.homeserver()
|
||||
}
|
||||
|
||||
var session: Session? {
|
||||
do {
|
||||
return try client.session()
|
||||
} catch {
|
||||
MXLog.error("Failed retrieving the client's session with error: \(error)")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
private(set) lazy var pusherNotificationClientIdentifier: String? = {
|
||||
// NOTE: The result is stored as part of the restoration token. Any changes
|
||||
// here would require a migration to correctly match incoming notifications.
|
||||
|
||||
@@ -78,9 +78,7 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
|
||||
var deviceID: String? { get }
|
||||
|
||||
var homeserver: String { get }
|
||||
|
||||
var session: Session? { get }
|
||||
|
||||
|
||||
var userDisplayName: CurrentValuePublisher<String?, Never> { get }
|
||||
|
||||
var userAvatarURL: CurrentValuePublisher<URL?, Never> { get }
|
||||
|
||||
@@ -26,7 +26,6 @@ class MockClientProxy: ClientProxyProtocol {
|
||||
let userID: String
|
||||
let deviceID: String?
|
||||
let homeserver = ""
|
||||
let session: Session? = nil
|
||||
let pusherNotificationClientIdentifier: String? = nil
|
||||
|
||||
var roomSummaryProvider: RoomSummaryProviderProtocol? = MockRoomSummaryProvider()
|
||||
|
||||
@@ -27,8 +27,7 @@ actor MediaLoader: MediaLoaderProtocol {
|
||||
private let client: ClientProtocol
|
||||
private var ongoingRequests = [MediaSourceProxy: MediaRequest]()
|
||||
|
||||
init(client: ClientProtocol,
|
||||
clientQueue: DispatchQueue = .global()) {
|
||||
init(client: ClientProtocol) {
|
||||
self.client = client
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user