Refactoring

This commit is contained in:
Ali
2021-08-12 16:41:11 +02:00
parent adc430b870
commit bf253eec46
84 changed files with 604 additions and 443 deletions

View File

@@ -4,6 +4,7 @@ import Display
import AsyncDisplayKit
import SwiftSignalKit
import Postbox
import TelegramCore
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
@@ -37,7 +38,7 @@ public final class PasscodeEntryController: ViewController {
}
private let applicationBindings: TelegramApplicationBindings
private let accountManager: AccountManager
private let accountManager: AccountManager<TelegramAccountManagerTypes>
private let appLockContext: AppLockContext
private let presentationDataSignal: Signal<PresentationData, NoError>
@@ -61,7 +62,7 @@ public final class PasscodeEntryController: ViewController {
private var statusBarHost: StatusBarHost?
private var previousStatusBarStyle: UIStatusBarStyle?
public init(applicationBindings: TelegramApplicationBindings, accountManager: AccountManager, appLockContext: AppLockContext, presentationData: PresentationData, presentationDataSignal: Signal<PresentationData, NoError>, statusBarHost: StatusBarHost?, challengeData: PostboxAccessChallengeData, biometrics: PasscodeEntryControllerBiometricsMode, arguments: PasscodeEntryControllerPresentationArguments) {
public init(applicationBindings: TelegramApplicationBindings, accountManager: AccountManager<TelegramAccountManagerTypes>, appLockContext: AppLockContext, presentationData: PresentationData, presentationDataSignal: Signal<PresentationData, NoError>, statusBarHost: StatusBarHost?, challengeData: PostboxAccessChallengeData, biometrics: PasscodeEntryControllerBiometricsMode, arguments: PasscodeEntryControllerPresentationArguments) {
self.applicationBindings = applicationBindings
self.accountManager = accountManager
self.appLockContext = appLockContext

View File

@@ -18,7 +18,7 @@ private let subtitleFont = Font.regular(15.0)
private let buttonFont = Font.regular(17.0)
final class PasscodeEntryControllerNode: ASDisplayNode {
private let accountManager: AccountManager
private let accountManager: AccountManager<TelegramAccountManagerTypes>
private var presentationData: PresentationData
private var theme: PresentationTheme
private var strings: PresentationStrings
@@ -53,7 +53,7 @@ final class PasscodeEntryControllerNode: ASDisplayNode {
var checkPasscode: ((String) -> Void)?
var requestBiometrics: (() -> Void)?
init(accountManager: AccountManager, presentationData: PresentationData, theme: PresentationTheme, strings: PresentationStrings, wallpaper: TelegramWallpaper, passcodeType: PasscodeEntryFieldType, biometricsType: LocalAuthBiometricAuthentication?, arguments: PasscodeEntryControllerPresentationArguments, modalPresentation: Bool) {
init(accountManager: AccountManager<TelegramAccountManagerTypes>, presentationData: PresentationData, theme: PresentationTheme, strings: PresentationStrings, wallpaper: TelegramWallpaper, passcodeType: PasscodeEntryFieldType, biometricsType: LocalAuthBiometricAuthentication?, arguments: PasscodeEntryControllerPresentationArguments, modalPresentation: Bool) {
self.accountManager = accountManager
self.presentationData = presentationData
self.theme = theme