mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Improved locking
This commit is contained in:
@@ -17,7 +17,7 @@ private let subtitleFont = Font.regular(15.0)
|
||||
private let buttonFont = Font.regular(17.0)
|
||||
|
||||
final class PasscodeEntryControllerNode: ASDisplayNode {
|
||||
private let context: AccountContext
|
||||
private let accountManager: AccountManager
|
||||
private var theme: PresentationTheme
|
||||
private var strings: PresentationStrings
|
||||
private var wallpaper: TelegramWallpaper
|
||||
@@ -49,8 +49,8 @@ final class PasscodeEntryControllerNode: ASDisplayNode {
|
||||
var checkPasscode: ((String) -> Void)?
|
||||
var requestBiometrics: (() -> Void)?
|
||||
|
||||
init(context: AccountContext, theme: PresentationTheme, strings: PresentationStrings, wallpaper: TelegramWallpaper, passcodeType: PasscodeEntryFieldType, biometricsType: LocalAuthBiometricAuthentication?, arguments: PasscodeEntryControllerPresentationArguments, statusBar: StatusBar) {
|
||||
self.context = context
|
||||
init(accountManager: AccountManager, theme: PresentationTheme, strings: PresentationStrings, wallpaper: TelegramWallpaper, passcodeType: PasscodeEntryFieldType, biometricsType: LocalAuthBiometricAuthentication?, arguments: PasscodeEntryControllerPresentationArguments, statusBar: StatusBar) {
|
||||
self.accountManager = accountManager
|
||||
self.theme = theme
|
||||
self.strings = strings
|
||||
self.wallpaper = wallpaper
|
||||
@@ -174,7 +174,7 @@ final class PasscodeEntryControllerNode: ASDisplayNode {
|
||||
|
||||
switch self.wallpaper {
|
||||
case .image, .file:
|
||||
if let image = chatControllerBackgroundImage(theme: self.theme, wallpaper: self.wallpaper, mediaBox: self.context.sharedContext.accountManager.mediaBox, composed: false, knockoutMode: false) {
|
||||
if let image = chatControllerBackgroundImage(theme: self.theme, wallpaper: self.wallpaper, mediaBox: self.accountManager.mediaBox, composed: false, knockoutMode: false) {
|
||||
self.background = ImageBasedPasscodeBackground(image: image, size: size)
|
||||
} else {
|
||||
self.background = GradientPasscodeBackground(size: size, backgroundColors: self.theme.passcode.backgroundColors.colors, buttonColor: self.theme.passcode.buttonColor)
|
||||
|
||||
Reference in New Issue
Block a user