mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
move path button into setttings
This commit is contained in:
parent
2a229bd663
commit
20a3b6ee26
3 changed files with 19 additions and 14 deletions
|
@ -421,12 +421,6 @@ final class HomeVC : BaseVC, UITableViewDataSource, UITableViewDelegate, NewConv
|
||||||
self.navigationController?.setViewControllers([ self, searchController ], animated: true)
|
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() {
|
@objc func joinOpenGroup() {
|
||||||
let joinOpenGroupVC = JoinOpenGroupVC()
|
let joinOpenGroupVC = JoinOpenGroupVC()
|
||||||
let navigationController = OWSNavigationController(rootViewController: joinOpenGroupVC)
|
let navigationController = OWSNavigationController(rootViewController: joinOpenGroupVC)
|
||||||
|
|
|
@ -40,10 +40,6 @@ final class PathVC : BaseVC {
|
||||||
private func setUpNavBar() {
|
private func setUpNavBar() {
|
||||||
setUpNavBarStyle()
|
setUpNavBarStyle()
|
||||||
setNavBarTitle(NSLocalizedString("vc_path_title", comment: ""))
|
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() {
|
private func setUpViewHierarchy() {
|
||||||
|
@ -167,10 +163,6 @@ final class PathVC : BaseVC {
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: Interaction
|
// MARK: Interaction
|
||||||
@objc private func close() {
|
|
||||||
dismiss(animated: true, completion: nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
@objc private func learnMore() {
|
@objc private func learnMore() {
|
||||||
let urlAsString = "https://getsession.org/faq/#onion-routing"
|
let urlAsString = "https://getsession.org/faq/#onion-routing"
|
||||||
let url = URL(string: urlAsString)!
|
let url = URL(string: urlAsString)!
|
||||||
|
|
|
@ -244,7 +244,21 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate {
|
||||||
button.set(.height, to: SettingsVC.buttonHeight)
|
button.set(.height, to: SettingsVC.buttonHeight)
|
||||||
return button
|
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 [
|
return [
|
||||||
|
getSeparator(),
|
||||||
|
pathButton,
|
||||||
getSeparator(),
|
getSeparator(),
|
||||||
getSettingButton(withTitle: NSLocalizedString("vc_settings_privacy_button_title", comment: ""), color: Colors.text, action: #selector(showPrivacySettings)),
|
getSettingButton(withTitle: NSLocalizedString("vc_settings_privacy_button_title", comment: ""), color: Colors.text, action: #selector(showPrivacySettings)),
|
||||||
getSeparator(),
|
getSeparator(),
|
||||||
|
@ -480,6 +494,11 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate {
|
||||||
navigationController!.present(shareVC, animated: true, completion: nil)
|
navigationController!.present(shareVC, animated: true, completion: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@objc private func showPath() {
|
||||||
|
let pathVC = PathVC()
|
||||||
|
navigationController!.pushViewController(pathVC, animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
@objc private func showPrivacySettings() {
|
@objc private func showPrivacySettings() {
|
||||||
let privacySettingsVC = PrivacySettingsTableViewController()
|
let privacySettingsVC = PrivacySettingsTableViewController()
|
||||||
navigationController!.pushViewController(privacySettingsVC, animated: true)
|
navigationController!.pushViewController(privacySettingsVC, animated: true)
|
||||||
|
|
Loading…
Reference in a new issue