Commit cec7236b authored by Jü's avatar

added privacy statement link

parent b91e5848
......@@ -44,5 +44,6 @@ public class Constants {
public static let estimatedMessageSizeInKB: Int = 13
public static let troubleShootingLink = "https://gitlab.com/rusticbison/xwallet#troubleshooting"
public static let privacyStatementLink = "https://gitlab.com/rusticbison/xwallet/blob/master/PRIVACY"
}
......@@ -108,6 +108,8 @@ public class SettingsCoordinator: Coordinator {
viewModel.feedbackShowFAQTitle = "Show FAQ"
viewModel.feedbackSendTitle = "Send Feedback"
viewModel.feedbackCancelTitle = "Cancel"
viewModel.privacyCellTitle = "Privacy"
viewModel.privacyCellButtonTitle = "Open Privacy Statement"
return viewModel
}
......
......@@ -86,7 +86,8 @@ class SettingsVC: UIViewController {
3: (tfaSupportCell, 122, nil),
4: (selectNodeCell, 142, nil),
5: (feedbackCell, 122, nil),
6: (nukeXWalletCell, 142, nil)
6: (nukeXWalletCell, 142, nil),
7: (privacyCell, 122, nil)
]
}
}
......@@ -214,6 +215,25 @@ class SettingsVC: UIViewController {
cell.redraw()
return cell
}()
private lazy var privacyCell: UITableViewCell = {
let cell = self.tableView.dequeueReusableCell(withIdentifier: CellIdentifier.actionCell.rawValue) as! ActionCell
if let cellTitle = self.viewModel.privacyCellTitle {
cell.cellTitle = cellTitle
}
if let buttonTitle = self.viewModel.privacyCellButtonTitle {
cell.buttonTitle = buttonTitle
}
cell.buttonTouchedHandler = { () in self.openPrivacyStatement() }
cell.redraw()
return cell
}()
private func openPrivacyStatement() {
if let url = URL(string: Constants.privacyStatementLink) {
UIApplication.shared.open(url, options: [:])
}
}
}
......
......@@ -50,6 +50,8 @@ struct SettingsViewModel {
public var feedbackShowFAQTitle: String?
public var feedbackSendTitle: String?
public var feedbackCancelTitle: String?
public var privacyCellTitle: String?
public var privacyCellButtonTitle: String?
public weak var delegate: SettingsVCProtocol?
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment