mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Removing Dead Code part 1 (#2234)
This commit is contained in:
-2
@@ -36,7 +36,6 @@ enum AppLockSetupPINScreenCoordinatorAction {
|
||||
}
|
||||
|
||||
final class AppLockSetupPINScreenCoordinator: CoordinatorProtocol {
|
||||
private let parameters: AppLockSetupPINScreenCoordinatorParameters
|
||||
private var viewModel: AppLockSetupPINScreenViewModelProtocol
|
||||
private let actionsSubject: PassthroughSubject<AppLockSetupPINScreenCoordinatorAction, Never> = .init()
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
@@ -48,7 +47,6 @@ final class AppLockSetupPINScreenCoordinator: CoordinatorProtocol {
|
||||
init(parameters: AppLockSetupPINScreenCoordinatorParameters) {
|
||||
guard parameters.initialMode != .confirm else { fatalError(".confirm is an invalid initial mode") }
|
||||
|
||||
self.parameters = parameters
|
||||
viewModel = AppLockSetupPINScreenViewModel(initialMode: parameters.initialMode,
|
||||
isMandatory: parameters.isMandatory,
|
||||
appLockService: parameters.appLockService)
|
||||
|
||||
+2
-2
@@ -45,7 +45,7 @@ class AppLockSetupPINScreenViewModel: AppLockSetupPINScreenViewModelType, AppLoc
|
||||
.debounce(for: 0.1, scheduler: DispatchQueue.main) // Show the last digit for long enough to be read.
|
||||
.sink { [weak self] pinCode in
|
||||
guard pinCode.count == 4 else { return }
|
||||
self?.submit(pinCode)
|
||||
self?.submit()
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
@@ -64,7 +64,7 @@ class AppLockSetupPINScreenViewModel: AppLockSetupPINScreenViewModelType, AppLoc
|
||||
// MARK: - Private
|
||||
|
||||
/// Handle the entered PIN code.
|
||||
private func submit(_ pinCode: String) {
|
||||
private func submit() {
|
||||
switch state.mode {
|
||||
case .create:
|
||||
createPIN()
|
||||
|
||||
Reference in New Issue
Block a user