Skip to content

Commit

Permalink
Extra tidy-up.
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave committed Nov 10, 2023
1 parent ca81465 commit 9311f74
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ class AppLockFlowCoordinator: CoordinatorProtocol {
// Set the initial background state.
showPlaceholder()

appLockService.disabledPublisher
.sink {
// When the service is disabled via a force logout, we need to remove the activity indicator.
}
.store(in: &cancellables)

notificationCenter.publisher(for: UIApplication.didEnterBackgroundNotification)
.sink { [weak self] _ in
self?.applicationDidEnterBackground()
Expand Down
4 changes: 0 additions & 4 deletions ElementX/Sources/Services/AppLock/AppLockService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ class AppLockService: AppLockServiceProtocol {

var numberOfPINAttempts: AnyPublisher<Int, Never> { appSettings.$appLockNumberOfPINAttempts }

private var disabledSubject: PassthroughSubject<Void, Never> = .init()
var disabledPublisher: AnyPublisher<Void, Never> { disabledSubject.eraseToAnyPublisher() }

init(keychainController: KeychainControllerProtocol, appSettings: AppSettings, context: LAContext = .init()) {
self.keychainController = keychainController
self.appSettings = appSettings
Expand Down Expand Up @@ -108,7 +105,6 @@ class AppLockService: AppLockServiceProtocol {
keychainController.removePINCode()
keychainController.removePINCodeBiometricState()
appSettings.appLockNumberOfPINAttempts = 0
disabledSubject.send()
}

func applicationDidEnterBackground() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ protocol AppLockServiceProtocol: AnyObject {
/// to re-enter their PIN code to re-enable the feature (i.e. to accept a new face or fingerprint).
var biometricUnlockTrusted: Bool { get }

/// A publisher that advertises when the service has been disabled.
var disabledPublisher: AnyPublisher<Void, Never> { get }

/// Sets the user's PIN code used to unlock the app.
func setupPINCode(_ pinCode: String) -> Result<Void, AppLockServiceError>
/// Validates the supplied PIN code is long enough, only contains digits and isn't a weak choice.
Expand Down

0 comments on commit 9311f74

Please sign in to comment.