Made number of lines in timeline configurable.

This commit is contained in:
Maurice Parker
2019-04-29 15:29:00 -05:00
parent b4e2acb5ce
commit 0451ed9e70
9 changed files with 153 additions and 14 deletions

View File

@@ -13,6 +13,7 @@ class SettingsViewController: UITableViewController {
@IBOutlet weak var refreshIntervalLabel: UILabel!
@IBOutlet weak var timelineSortOrderSwitch: UISwitch!
@IBOutlet weak var timelineNumberOfLinesLabel: UILabel!
weak var presentingParentController: UIViewController?
@@ -33,6 +34,9 @@ class SettingsViewController: UITableViewController {
refreshIntervalLabel.text = AppDefaults.refreshInterval.description()
let numberOfLinesText = NSLocalizedString(" lines", comment: "Lines")
timelineNumberOfLinesLabel.text = "\(AppDefaults.timelineNumberOfLines)" + numberOfLinesText
let buildLabel = UILabel(frame: CGRect(x: 20.0, y: 0.0, width: 0.0, height: 0.0))
buildLabel.font = UIFont.systemFont(ofSize: 11.0)
buildLabel.textColor = UIColor.gray
@@ -70,6 +74,11 @@ class SettingsViewController: UITableViewController {
}
case 2:
UIApplication.shared.open(URL(string: "https://appcamp4girls.com/contribute/")!, options: [:])
case 3:
if indexPath.row == 1 {
let timeline = UIStoryboard.settings.instantiateController(ofType: TimelineNumberOfLinesViewController.self)
self.navigationController?.pushViewController(timeline, animated: true)
}
case 4:
switch indexPath.row {
case 0: