From 9311f74cc1f97db1126a3d4e38fef8da1ef6ce4d Mon Sep 17 00:00:00 2001 From: Doug Date: Fri, 10 Nov 2023 16:37:50 +0000 Subject: [PATCH] Extra tidy-up. --- .../Sources/FlowCoordinators/AppLockFlowCoordinator.swift | 6 ------ ElementX/Sources/Services/AppLock/AppLockService.swift | 4 ---- .../Sources/Services/AppLock/AppLockServiceProtocol.swift | 3 --- 3 files changed, 13 deletions(-) diff --git a/ElementX/Sources/FlowCoordinators/AppLockFlowCoordinator.swift b/ElementX/Sources/FlowCoordinators/AppLockFlowCoordinator.swift index b05ab77e2e..4d235cfae0 100644 --- a/ElementX/Sources/FlowCoordinators/AppLockFlowCoordinator.swift +++ b/ElementX/Sources/FlowCoordinators/AppLockFlowCoordinator.swift @@ -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() diff --git a/ElementX/Sources/Services/AppLock/AppLockService.swift b/ElementX/Sources/Services/AppLock/AppLockService.swift index 754345e52a..794478dcf0 100644 --- a/ElementX/Sources/Services/AppLock/AppLockService.swift +++ b/ElementX/Sources/Services/AppLock/AppLockService.swift @@ -56,9 +56,6 @@ class AppLockService: AppLockServiceProtocol { var numberOfPINAttempts: AnyPublisher { appSettings.$appLockNumberOfPINAttempts } - private var disabledSubject: PassthroughSubject = .init() - var disabledPublisher: AnyPublisher { disabledSubject.eraseToAnyPublisher() } - init(keychainController: KeychainControllerProtocol, appSettings: AppSettings, context: LAContext = .init()) { self.keychainController = keychainController self.appSettings = appSettings @@ -108,7 +105,6 @@ class AppLockService: AppLockServiceProtocol { keychainController.removePINCode() keychainController.removePINCodeBiometricState() appSettings.appLockNumberOfPINAttempts = 0 - disabledSubject.send() } func applicationDidEnterBackground() { diff --git a/ElementX/Sources/Services/AppLock/AppLockServiceProtocol.swift b/ElementX/Sources/Services/AppLock/AppLockServiceProtocol.swift index 3ba26eb13f..fdd3289646 100644 --- a/ElementX/Sources/Services/AppLock/AppLockServiceProtocol.swift +++ b/ElementX/Sources/Services/AppLock/AppLockServiceProtocol.swift @@ -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 { get } - /// Sets the user's PIN code used to unlock the app. func setupPINCode(_ pinCode: String) -> Result /// Validates the supplied PIN code is long enough, only contains digits and isn't a weak choice.