mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Run SwiftFormat.
This commit is contained in:
@@ -40,7 +40,7 @@ final class ReportContentScreenCoordinator: CoordinatorProtocol {
|
||||
roomProxy: parameters.roomProxy,
|
||||
clientProxy: parameters.clientProxy)
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
func start() {
|
||||
@@ -63,26 +63,26 @@ final class ReportContentScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
|
||||
func stop() {
|
||||
stopLoading()
|
||||
}
|
||||
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(ReportContentScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
|
||||
private static let loadingIndicatorIdentifier = "\(ReportContentScreenCoordinator.self)-Loading"
|
||||
|
||||
|
||||
private func startLoading() {
|
||||
parameters.userIndicatorController.submitIndicator(UserIndicator(id: Self.loadingIndicatorIdentifier,
|
||||
type: .modal,
|
||||
title: L10n.commonSending,
|
||||
persistent: true))
|
||||
}
|
||||
|
||||
|
||||
private func stopLoading() {
|
||||
parameters.userIndicatorController.retractIndicatorWithId(Self.loadingIndicatorIdentifier)
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class ReportContentScreenViewModel: ReportContentScreenViewModelType, ReportCont
|
||||
var actions: AnyPublisher<ReportContentScreenViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
||||
init(eventID: String, senderID: String, roomProxy: JoinedRoomProxyProtocol, clientProxy: ClientProxyProtocol) {
|
||||
self.eventID = eventID
|
||||
self.senderID = senderID
|
||||
@@ -30,7 +30,7 @@ class ReportContentScreenViewModel: ReportContentScreenViewModelType, ReportCont
|
||||
|
||||
super.init(initialViewState: ReportContentScreenViewState(bindings: ReportContentScreenViewStateBindings(reasonText: "", ignoreUser: false)))
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
override func process(viewAction: ReportContentScreenViewAction) {
|
||||
@@ -41,9 +41,9 @@ class ReportContentScreenViewModel: ReportContentScreenViewModelType, ReportCont
|
||||
Task { await submitReport() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: Private
|
||||
|
||||
|
||||
private func submitReport() async {
|
||||
actionsSubject.send(.submitStarted)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import SwiftUI
|
||||
|
||||
struct ReportContentScreen: View {
|
||||
@Bindable var context: ReportContentScreenViewModel.Context
|
||||
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
reasonSection
|
||||
@@ -25,7 +25,7 @@ struct ReportContentScreen: View {
|
||||
.toolbar { toolbar }
|
||||
.interactiveDismissDisabled()
|
||||
}
|
||||
|
||||
|
||||
private var reasonSection: some View {
|
||||
Section {
|
||||
ListRow(label: .plain(title: L10n.screenReportContentHint),
|
||||
@@ -47,7 +47,7 @@ struct ReportContentScreen: View {
|
||||
.compoundListSectionFooter()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ToolbarContentBuilder
|
||||
private var toolbar: some ToolbarContent {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
@@ -55,7 +55,7 @@ struct ReportContentScreen: View {
|
||||
context.send(viewAction: .cancel)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
Button(L10n.actionSend) {
|
||||
context.send(viewAction: .submit)
|
||||
|
||||
Reference in New Issue
Block a user