mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 20:39:24 +00:00
Run SwiftFormat.
This commit is contained in:
+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