mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Run SwiftFormat.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user