move path button into setttings
This commit is contained in:
parent
2a229bd663
commit
20a3b6ee26
|
@ -421,12 +421,6 @@ final class HomeVC : BaseVC, UITableViewDataSource, UITableViewDelegate, NewConv
|
|||
self.navigationController?.setViewControllers([ self, searchController ], animated: true)
|
||||
}
|
||||
|
||||
@objc private func showPath() {
|
||||
let pathVC = PathVC()
|
||||
let navigationController = OWSNavigationController(rootViewController: pathVC)
|
||||
present(navigationController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@objc func joinOpenGroup() {
|
||||
let joinOpenGroupVC = JoinOpenGroupVC()
|
||||
let navigationController = OWSNavigationController(rootViewController: joinOpenGroupVC)
|
||||
|
|
|
@ -40,10 +40,6 @@ final class PathVC : BaseVC {
|
|||
private func setUpNavBar() {
|
||||
setUpNavBarStyle()
|
||||
setNavBarTitle(NSLocalizedString("vc_path_title", comment: ""))
|
||||
// Set up close button
|
||||
let closeButton = UIBarButtonItem(image: #imageLiteral(resourceName: "X"), style: .plain, target: self, action: #selector(close))
|
||||
closeButton.tintColor = Colors.text
|
||||
navigationItem.leftBarButtonItem = closeButton
|
||||
}
|
||||
|
||||
private func setUpViewHierarchy() {
|
||||
|
@ -167,10 +163,6 @@ final class PathVC : BaseVC {
|
|||
}
|
||||
|
||||
// MARK: Interaction
|
||||
@objc private func close() {
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@objc private func learnMore() {
|
||||
let urlAsString = "https://getsession.org/faq/#onion-routing"
|
||||
let url = URL(string: urlAsString)!
|
||||
|
|
|
@ -244,7 +244,21 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate {
|
|||
button.set(.height, to: SettingsVC.buttonHeight)
|
||||
return button
|
||||
}
|
||||
|
||||
let pathButton = getSettingButton(withTitle: NSLocalizedString("vc_path_title", comment: ""), color: Colors.text, action: #selector(showPath))
|
||||
let pathStatusView = PathStatusView()
|
||||
pathStatusView.set(.width, to: PathStatusView.size)
|
||||
pathStatusView.set(.height, to: PathStatusView.size)
|
||||
|
||||
pathButton.addSubview(pathStatusView)
|
||||
pathStatusView.pin(.leading, to: .trailing, of: pathButton.titleLabel!, withInset: Values.smallSpacing)
|
||||
pathStatusView.autoVCenterInSuperview()
|
||||
|
||||
pathButton.titleEdgeInsets = UIEdgeInsets(top: 0, leading: 0, bottom: 0, trailing: Values.smallSpacing)
|
||||
|
||||
return [
|
||||
getSeparator(),
|
||||
pathButton,
|
||||
getSeparator(),
|
||||
getSettingButton(withTitle: NSLocalizedString("vc_settings_privacy_button_title", comment: ""), color: Colors.text, action: #selector(showPrivacySettings)),
|
||||
getSeparator(),
|
||||
|
@ -480,6 +494,11 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate {
|
|||
navigationController!.present(shareVC, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@objc private func showPath() {
|
||||
let pathVC = PathVC()
|
||||
navigationController!.pushViewController(pathVC, animated: true)
|
||||
}
|
||||
|
||||
@objc private func showPrivacySettings() {
|
||||
let privacySettingsVC = PrivacySettingsTableViewController()
|
||||
navigationController!.pushViewController(privacySettingsVC, animated: true)
|
||||
|
|
Loading…
Reference in New Issue