From ba81d1e4129709801d68531c6132c5698719b0da Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Sun, 28 Apr 2019 20:00:44 +0400 Subject: [PATCH] Update submodules --- Share/ShareRootController.swift | 68 --------------------------------- submodules/TelegramUI | 2 +- 2 files changed, 1 insertion(+), 69 deletions(-) diff --git a/Share/ShareRootController.swift b/Share/ShareRootController.swift index 2509adf8b4..53dcb3fcf5 100644 --- a/Share/ShareRootController.swift +++ b/Share/ShareRootController.swift @@ -325,74 +325,6 @@ class ShareRootController: UIViewController { strongSelf.currentPasscodeController = controller strongSelf.mainWindow?.present(controller, on: .root) }) - - /*var attemptData: TGPasscodeEntryAttemptData? - if let attempts = accessChallengeData.attempts { - attemptData = TGPasscodeEntryAttemptData(numberOfInvalidAttempts: Int(attempts.count), dateOfLastInvalidAttempt: Double(attempts.timestamp)) - } - let mode: TGPasscodeEntryControllerMode - switch accessChallengeData { - case .none: - displayShare() - return - case .numericalPassword: - mode = TGPasscodeEntryControllerModeVerifySimple - case .plaintextPassword: - mode = TGPasscodeEntryControllerModeVerifyComplex - } - let presentationData = account.telegramApplicationContext.currentPresentationData.with { $0 } - - let legacyController = LegacyController(presentation: LegacyControllerPresentation.modal(animateIn: true), theme: presentationData.theme) - let controller = TGPasscodeEntryController(context: legacyController.context, style: TGPasscodeEntryControllerStyleDefault, mode: mode, cancelEnabled: true, allowTouchId: false, attemptData: attemptData, completion: { value in - if value != nil { - displayShare() - } else { - self?.extensionContext?.completeRequest(returningItems: nil, completionHandler: nil) - } - })! - controller.checkCurrentPasscode = { value in - if let value = value { - switch accessChallengeData { - case .none: - return true - case let .numericalPassword(code, _, _): - return value == code - case let .plaintextPassword(code, _, _): - return value == code - } - } else { - return false - } - } - controller.updateAttemptData = { attemptData in - let _ = account.postbox.transaction({ transaction -> Void in - var attempts: AccessChallengeAttempts? - if let attemptData = attemptData { - attempts = AccessChallengeAttempts(count: Int32(attemptData.numberOfInvalidAttempts), timestamp: Int32(attemptData.dateOfLastInvalidAttempt)) - } - var data = transaction.getAccessChallengeData() - switch data { - case .none: - break - case let .numericalPassword(value, timeout, _): - data = .numericalPassword(value: value, timeout: timeout, attempts: attempts) - case let .plaintextPassword(value, timeout, _): - data = .plaintextPassword(value: value, timeout: timeout, attempts: attempts) - } - transaction.setAccessChallengeData(data) - }).start() - } - /*controller.touchIdCompletion = { - let _ = (account.postbox.transaction { transaction -> Void in - let data = transaction.getAccessChallengeData().withUpdatedAutolockDeadline(nil) - transaction.setAccessChallengeData(data) - }).start() - }*/ - - legacyController.bind(controller: controller) - legacyController.supportedOrientations = ViewControllerSupportedOrientations(regularSize: .portrait, compactSize: .portrait) - legacyController.statusBar.statusBarStyle = .White - */ } self.disposable.set(applicationInterface.start(next: { _, _, _ in }, error: { [weak self] error in diff --git a/submodules/TelegramUI b/submodules/TelegramUI index d442361ab2..2463fcf0b7 160000 --- a/submodules/TelegramUI +++ b/submodules/TelegramUI @@ -1 +1 @@ -Subproject commit d442361ab2be271fa1ba8a724c06c72034d7b250 +Subproject commit 2463fcf0b7948b74c4311ef1afdee0a9a34c9bf0