Run SwiftFormat.

This commit is contained in:
Doug
2026-05-27 14:38:50 +01:00
committed by Doug
parent 5138e05e47
commit fa67713726
573 changed files with 2426 additions and 2426 deletions
@@ -28,7 +28,7 @@ final class StartChatScreenCoordinator: CoordinatorProtocol {
private let parameters: StartChatScreenCoordinatorParameters
private var viewModel: StartChatScreenViewModelProtocol
private var cancellables = Set<AnyCancellable>()
private let actionsSubject: PassthroughSubject<StartChatScreenCoordinatorAction, Never> = .init()
var actions: AnyPublisher<StartChatScreenCoordinatorAction, Never> {
actionsSubject.eraseToAnyPublisher()
@@ -60,7 +60,7 @@ final class StartChatScreenCoordinator: CoordinatorProtocol {
}
.store(in: &cancellables)
}
// MARK: - Public
func toPresentable() -> AnyView {
@@ -24,7 +24,7 @@ struct StartChatScreenViewState: BindableState {
let userID: String
var bindings = StartChatScreenViewStateBindings()
var usersSection: UserDiscoverySection = .init(type: .suggestions, users: [])
var isSearching: Bool {
!bindings.searchQuery.isEmpty
}
@@ -151,7 +151,7 @@ class StartChatScreenViewModel: StartChatScreenViewModelType, StartChatScreenVie
internalRoomAddressState = .addressNotFound
return
}
guard !Task.isCancelled else {
return
}
@@ -185,7 +185,7 @@ class StartChatScreenViewModel: StartChatScreenViewModelType, StartChatScreenVie
}
}
}
private func createDirectRoom(user: UserProfileProxy) async {
defer {
hideLoadingIndicator()
@@ -227,7 +227,7 @@ class StartChatScreenViewModel: StartChatScreenViewModelType, StartChatScreenVie
state.joinByAddressState = internalRoomAddressState
}
}
// MARK: Loading indicator
private static let loadingIndicatorIdentifier = "\(StartChatScreenViewModel.self)-Loading"
@@ -82,7 +82,7 @@ struct JoinRoomByAddressView_Previews: PreviewProvider, TestablePreview {
let userSession = UserSessionMock(.init(clientProxy: ClientProxyMock(.init(userID: "@userid:example.com"))))
let userDiscoveryService = UserDiscoveryServiceMock()
userDiscoveryService.searchProfilesWithReturnValue = .success([.mockAlice])
return StartChatScreenViewModel(userSession: userSession,
analytics: AnalyticsServiceMock(.init()),
userIndicatorController: UserIndicatorControllerMock(),
@@ -44,9 +44,9 @@ struct StartChatScreen: View {
JoinRoomByAddressView(context: context)
}
}
// MARK: - Private
/// The content shown in the form when the search query is empty.
@ViewBuilder
private var mainContent: some View {