no message

This commit is contained in:
Peter
2017-04-18 19:53:47 +03:00
parent 6238c5d9d6
commit d55e3da7b3
186 changed files with 11037 additions and 826 deletions

View File

@@ -276,6 +276,7 @@ public func privacyAndSecurityController(account: Account, initialSettings: Sign
}
var pushControllerImpl: ((ViewController) -> Void)?
var pushControllerInstantImpl: ((ViewController) -> Void)?
var presentControllerImpl: ((ViewController) -> Void)?
let actionsDisposable = DisposableSet()
@@ -361,7 +362,17 @@ public func privacyAndSecurityController(account: Account, initialSettings: Sign
}
}))
}, openPasscode: {
let _ = passcodeOptionsAccessController(account: account, completion: { animated in
if animated {
pushControllerImpl?(passcodeOptionsController(account: account))
} else {
pushControllerInstantImpl?(passcodeOptionsController(account: account))
}
}).start(next: { controller in
if let controller = controller {
presentControllerImpl?(controller)
}
})
}, openTwoStepVerification: {
pushControllerImpl?(twoStepVerificationUnlockSettingsController(account: account, mode: .access))
}, openActiveSessions: {
@@ -434,7 +445,7 @@ public func privacyAndSecurityController(account: Account, initialSettings: Sign
rightNavigationButton = ItemListNavigationButton(title: "", style: .activity, enabled: true, action: {})
}
let controllerState = ItemListControllerState(title: "Privacy and Security", leftNavigationButton: nil, rightNavigationButton: rightNavigationButton, animateChanges: false)
let controllerState = ItemListControllerState(title: .text("Privacy and Security"), leftNavigationButton: nil, rightNavigationButton: rightNavigationButton, animateChanges: false)
let listState = ItemListNodeState(entries: privacyAndSecurityControllerEntries(state: state, privacySettings: privacySettings), style: .blocks, animateChanges: false)
return (controllerState, (listState, arguments))
@@ -447,6 +458,9 @@ public func privacyAndSecurityController(account: Account, initialSettings: Sign
pushControllerImpl = { [weak controller] c in
(controller?.navigationController as? NavigationController)?.pushViewController(c)
}
pushControllerInstantImpl = { [weak controller] c in
(controller?.navigationController as? NavigationController)?.pushViewController(c, animated: false)
}
presentControllerImpl = { [weak controller] c in
controller?.present(c, in: .window, with: ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
}