mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
Periphery to detect dead code (#2227)
This commit is contained in:
@@ -145,7 +145,7 @@ public struct AuthenticationTextFieldStyle: TextFieldStyle {
|
||||
}
|
||||
|
||||
struct ElementTextFieldStyle_Previews: PreviewProvider {
|
||||
public static var previews: some View {
|
||||
static var previews: some View {
|
||||
ScrollView {
|
||||
VStack(spacing: 20) {
|
||||
// Plain text field.
|
||||
|
||||
@@ -51,9 +51,6 @@ struct PollFormScreen: View {
|
||||
Section {
|
||||
ListRow(label: .plain(title: L10n.screenCreatePollQuestionHint),
|
||||
kind: .textField(text: $context.question, axis: .vertical))
|
||||
.introspect(.textField, on: .supportedVersions) { textField in
|
||||
textField.clearButtonMode = .whileEditing
|
||||
}
|
||||
.focused($focus, equals: .question)
|
||||
.accessibilityIdentifier(A11yIdentifiers.pollFormScreen.question)
|
||||
.onSubmit {
|
||||
|
||||
-11
@@ -17,20 +17,9 @@
|
||||
import Combine
|
||||
import SwiftUI
|
||||
|
||||
enum AdvancedSettingsScreenCoordinatorAction {
|
||||
case clearCache
|
||||
}
|
||||
|
||||
final class AdvancedSettingsScreenCoordinator: CoordinatorProtocol {
|
||||
private var viewModel: AdvancedSettingsScreenViewModelProtocol
|
||||
|
||||
private let actionsSubject: PassthroughSubject<AdvancedSettingsScreenCoordinatorAction, Never> = .init()
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
|
||||
var actions: AnyPublisher<AdvancedSettingsScreenCoordinatorAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
init() {
|
||||
viewModel = AdvancedSettingsScreenViewModel(advancedSettings: ServiceLocator.shared.settings)
|
||||
}
|
||||
|
||||
-2
@@ -16,8 +16,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
enum AdvancedSettingsScreenViewModelAction { }
|
||||
|
||||
struct AdvancedSettingsScreenViewState: BindableState {
|
||||
var bindings: AdvancedSettingsScreenViewStateBindings
|
||||
}
|
||||
|
||||
-6
@@ -20,12 +20,6 @@ import SwiftUI
|
||||
typealias AdvancedSettingsScreenViewModelType = StateStoreViewModel<AdvancedSettingsScreenViewState, AdvancedSettingsScreenViewAction>
|
||||
|
||||
class AdvancedSettingsScreenViewModel: AdvancedSettingsScreenViewModelType, AdvancedSettingsScreenViewModelProtocol {
|
||||
private var actionsSubject: PassthroughSubject<AdvancedSettingsScreenViewModelAction, Never> = .init()
|
||||
|
||||
var actions: AnyPublisher<AdvancedSettingsScreenViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
init(advancedSettings: AdvancedSettingsProtocol) {
|
||||
let bindings = AdvancedSettingsScreenViewStateBindings(advancedSettings: advancedSettings)
|
||||
let state = AdvancedSettingsScreenViewState(bindings: bindings)
|
||||
|
||||
-1
@@ -18,6 +18,5 @@ import Combine
|
||||
|
||||
@MainActor
|
||||
protocol AdvancedSettingsScreenViewModelProtocol {
|
||||
var actions: AnyPublisher<AdvancedSettingsScreenViewModelAction, Never> { get }
|
||||
var context: AdvancedSettingsScreenViewModelType.Context { get }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user