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:
+1
-1
@@ -23,7 +23,7 @@ class AnalyticsPromptScreenViewModel: AnalyticsPromptScreenViewModelType, Analyt
|
||||
let promptStrings = AnalyticsPromptScreenStrings(termsURL: termsURL)
|
||||
super.init(initialViewState: AnalyticsPromptScreenViewState(strings: promptStrings))
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
override func process(viewAction: AnalyticsPromptScreenViewAction) {
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ struct AnalyticsPromptScreen: View {
|
||||
.frame(maxWidth: .infinity)
|
||||
.environment(\.backgroundStyle, AnyShapeStyle(.compound.bgSubtleSecondary))
|
||||
}
|
||||
|
||||
|
||||
private func checkMarkItem(title: String, position: ListPosition) -> some View {
|
||||
VisualListItem(title: title, position: position) {
|
||||
CompoundIcon(\.checkCircle, size: .small, relativeTo: .body)
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ final class IdentityConfirmationScreenCoordinator: CoordinatorProtocol {
|
||||
private let viewModel: IdentityConfirmationScreenViewModelProtocol
|
||||
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
|
||||
|
||||
private let actionsSubject: PassthroughSubject<IdentityConfirmationScreenCoordinatorAction, Never> = .init()
|
||||
var actionsPublisher: AnyPublisher<IdentityConfirmationScreenCoordinatorAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
@@ -63,7 +63,7 @@ final class IdentityConfirmationScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(IdentityConfirmationScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ struct IdentityConfirmationScreen: View {
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
.padding(.bottom, 8)
|
||||
|
||||
|
||||
Text(L10n.screenIdentityConfirmationSubtitle)
|
||||
.font(.compound.bodyMD)
|
||||
.multilineTextAlignment(.center)
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ final class IdentityConfirmedScreenCoordinator: CoordinatorProtocol {
|
||||
private let viewModel: IdentityConfirmedScreenViewModelProtocol
|
||||
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
|
||||
|
||||
private let actionsSubject: PassthroughSubject<IdentityConfirmedScreenCoordinatorAction, Never> = .init()
|
||||
var actionsPublisher: AnyPublisher<IdentityConfirmedScreenCoordinatorAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
@@ -44,7 +44,7 @@ final class IdentityConfirmedScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(IdentityConfirmedScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ class IdentityConfirmedScreenViewModel: IdentityConfirmedScreenViewModelType, Id
|
||||
var actionsPublisher: AnyPublisher<IdentityConfirmedScreenViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
||||
init() {
|
||||
super.init(initialViewState: .init())
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ struct IdentityConfirmedScreen: View {
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
.padding(.bottom, 8)
|
||||
|
||||
|
||||
Text(L10n.screenIdentityConfirmedSubtitle)
|
||||
.font(.compound.bodyMD)
|
||||
.multilineTextAlignment(.center)
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ class NotificationPermissionsScreenViewModel: NotificationPermissionsScreenViewM
|
||||
|
||||
super.init(initialViewState: .init())
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
override func process(viewAction: NotificationPermissionsScreenViewAction) {
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ struct NotificationPermissionsScreen: View {
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private var buttons: some View {
|
||||
VStack(spacing: 16) {
|
||||
Button(L10n.actionOk) { context.send(viewAction: .enable) }
|
||||
|
||||
+2
-2
@@ -88,7 +88,7 @@ struct SessionVerificationScreenViewState: BindableState {
|
||||
return L10n.commonVerificationFailed
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var message: String {
|
||||
switch verificationState {
|
||||
case .initial, .acceptingVerificationRequest, .requestingVerification,
|
||||
@@ -127,7 +127,7 @@ struct SessionVerificationScreenViewState: BindableState {
|
||||
return L10n.screenSessionVerificationFailedSubtitle
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var isWaiting: Bool {
|
||||
switch verificationState {
|
||||
case .acceptingVerificationRequest, .requestingVerification, .verificationRequestAccepted,
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ class SessionVerificationScreenStateMachine {
|
||||
var state: State {
|
||||
stateMachine.state
|
||||
}
|
||||
|
||||
|
||||
init(state: State) {
|
||||
stateMachine = StateMachine(state: state)
|
||||
configure()
|
||||
|
||||
+3
-3
@@ -16,13 +16,13 @@ class SessionVerificationScreenViewModel: SessionVerificationViewModelType, Sess
|
||||
private let flow: SessionVerificationScreenFlow
|
||||
|
||||
private var stateMachine: SessionVerificationScreenStateMachine
|
||||
|
||||
|
||||
private var actionsSubject: PassthroughSubject<SessionVerificationScreenViewModelAction, Never> = .init()
|
||||
|
||||
var actions: AnyPublisher<SessionVerificationScreenViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
||||
init(sessionVerificationControllerProxy: SessionVerificationControllerProxyProtocol,
|
||||
flow: SessionVerificationScreenFlow,
|
||||
appSettings: AppSettings,
|
||||
@@ -115,7 +115,7 @@ class SessionVerificationScreenViewModel: SessionVerificationViewModelType, Sess
|
||||
private func setupStateMachine() {
|
||||
stateMachine.addTransitionHandler { [weak self] context in
|
||||
guard let self else { return }
|
||||
|
||||
|
||||
state.verificationState = context.toState
|
||||
|
||||
switch (context.fromState, context.event, context.toState) {
|
||||
|
||||
+2
-2
@@ -70,7 +70,7 @@ struct SessionVerificationScreen: View {
|
||||
accessibilityFocus = .title
|
||||
}
|
||||
.accessibilityFocused($accessibilityFocus, equals: .title)
|
||||
|
||||
|
||||
Text(context.viewState.message)
|
||||
.font(.compound.bodyMD)
|
||||
.multilineTextAlignment(.center)
|
||||
@@ -153,7 +153,7 @@ struct SessionVerificationScreen: View {
|
||||
}
|
||||
.buttonStyle(.compound(.primary))
|
||||
}
|
||||
|
||||
|
||||
case .showingChallenge:
|
||||
VStack(spacing: 16) {
|
||||
Button(L10n.screenSessionVerificationTheyMatch) {
|
||||
|
||||
Reference in New Issue
Block a user