mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Periphery cleanup (#5893)
This commit is contained in:
@@ -15,7 +15,6 @@ struct InviteUsersScreenCoordinatorParameters {
|
||||
let isSkippable: Bool
|
||||
let userDiscoveryService: UserDiscoveryServiceProtocol
|
||||
let userIndicatorController: UserIndicatorControllerProtocol
|
||||
let appSettings: AppSettings
|
||||
}
|
||||
|
||||
enum InviteUsersScreenCoordinatorAction {
|
||||
@@ -37,8 +36,7 @@ final class InviteUsersScreenCoordinator: CoordinatorProtocol {
|
||||
roomType: parameters.roomType,
|
||||
isSkippable: parameters.isSkippable,
|
||||
userDiscoveryService: parameters.userDiscoveryService,
|
||||
userIndicatorController: parameters.userIndicatorController,
|
||||
appSettings: parameters.appSettings)
|
||||
userIndicatorController: parameters.userIndicatorController)
|
||||
}
|
||||
|
||||
func start() {
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
|
||||
// periphery:ignore - for generic conformance
|
||||
enum InviteUsersScreenErrorType: Error {
|
||||
case unknown
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
|
||||
private let roomType: InviteUsersScreenRoomType
|
||||
private let userDiscoveryService: UserDiscoveryServiceProtocol
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
private let appSettings: AppSettings
|
||||
|
||||
private var suggestedUsers = [UserProfile]()
|
||||
|
||||
@@ -30,13 +29,11 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
|
||||
roomType: InviteUsersScreenRoomType,
|
||||
isSkippable: Bool,
|
||||
userDiscoveryService: UserDiscoveryServiceProtocol,
|
||||
userIndicatorController: UserIndicatorControllerProtocol,
|
||||
appSettings: AppSettings) {
|
||||
userIndicatorController: UserIndicatorControllerProtocol) {
|
||||
clientProxy = userSession.clientProxy
|
||||
self.roomType = roomType
|
||||
self.userDiscoveryService = userDiscoveryService
|
||||
self.userIndicatorController = userIndicatorController
|
||||
self.appSettings = appSettings
|
||||
|
||||
let mandatoryInvitees: [UserProfile] = if case .draft(let invitees) = roomType {
|
||||
invitees
|
||||
@@ -194,7 +191,6 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
|
||||
}
|
||||
}
|
||||
|
||||
// periphery:ignore - automatically cancelled when set to nil
|
||||
@CancellableTask
|
||||
private var fetchUsersTask: Task<Void, Never>?
|
||||
|
||||
|
||||
+1
-2
@@ -64,8 +64,7 @@ struct InviteUsersConfirmationSheetView_Previews: PreviewProvider, TestablePrevi
|
||||
roomType: .existingRoom(roomProxy: JoinedRoomProxyMock(.init(members: []))),
|
||||
isSkippable: true,
|
||||
userDiscoveryService: UserDiscoveryServiceMock(),
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
appSettings: .volatile())
|
||||
userIndicatorController: UserIndicatorControllerMock())
|
||||
|
||||
viewModel.state.usersToConfirm = [.mockAlice, .mockCharlie, .mockBob, .mockDan]
|
||||
|
||||
|
||||
@@ -212,8 +212,7 @@ struct InviteUsersScreen_Previews: PreviewProvider, TestablePreview {
|
||||
roomType: roomType ?? .existingRoom(roomProxy: JoinedRoomProxyMock(.init(members: []))),
|
||||
isSkippable: isSkippable,
|
||||
userDiscoveryService: userDiscoveryService,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
appSettings: .volatile())
|
||||
userIndicatorController: UserIndicatorControllerMock())
|
||||
|
||||
if let searchQuery {
|
||||
viewModel.context.searchQuery = searchQuery
|
||||
|
||||
@@ -48,13 +48,6 @@ struct InviteUsersScreenSelectedItem: View {
|
||||
avatarImage.overlayRemoveItemButton(action: dismissAction)
|
||||
}
|
||||
}
|
||||
|
||||
var closeButtonLabel: some View {
|
||||
CompoundIcon(\.close, size: .custom(12), relativeTo: .compound.bodySM)
|
||||
.foregroundStyle(.compound.iconOnSolidPrimary)
|
||||
.padding(2)
|
||||
.background(.compound.iconPrimary, in: Circle())
|
||||
}
|
||||
}
|
||||
|
||||
struct InviteUsersScreenSelectedItem_Previews: PreviewProvider, TestablePreview {
|
||||
|
||||
Reference in New Issue
Block a user