From 9fa6af6cfa74a17e8c459aca630d1dc562a1d272 Mon Sep 17 00:00:00 2001 From: Allan Lang Date: Sat, 10 Sep 2022 17:36:36 +0100 Subject: [PATCH] Ignore taps on API endpoint setting --- Tree Tracker/Info.plist | 2 +- .../Screens/Settings/SettingsController.swift | 21 +++++++++++-------- Unit Tests/Info.plist | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Tree Tracker/Info.plist b/Tree Tracker/Info.plist index fdb3bfa..0503426 100644 --- a/Tree Tracker/Info.plist +++ b/Tree Tracker/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 0.10.1 + 0.10.2 CFBundleVersion $(CURRENT_PROJECT_VERSION) ITSAppUsesNonExemptEncryption diff --git a/Tree Tracker/Screens/Settings/SettingsController.swift b/Tree Tracker/Screens/Settings/SettingsController.swift index 0951a9b..4862406 100644 --- a/Tree Tracker/Screens/Settings/SettingsController.swift +++ b/Tree Tracker/Screens/Settings/SettingsController.swift @@ -55,6 +55,7 @@ class SettingsController: UITableViewController { cell.textLabel?.text = entityTypes[indexPath.item] case 1: cell.textLabel?.text = Constants.Http.protectEarthApiBaseUrl + cell.selectionStyle = .none default: break } @@ -63,15 +64,17 @@ class SettingsController: UITableViewController { // MARK: - Delegate override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - switch entityTypes[indexPath.item] { - case "Sites": - self.navigationController?.pushViewController(sitesController, animated: true) - case "Supervisors": - self.navigationController?.pushViewController(supervisorsController, animated: true) - case "Species": - self.navigationController?.pushViewController(speciesController, animated: true) - default: - break + if indexPath.section == 0 { + switch entityTypes[indexPath.item] { + case "Sites": + self.navigationController?.pushViewController(sitesController, animated: true) + case "Supervisors": + self.navigationController?.pushViewController(supervisorsController, animated: true) + case "Species": + self.navigationController?.pushViewController(speciesController, animated: true) + default: + break + } } } diff --git a/Unit Tests/Info.plist b/Unit Tests/Info.plist index ddf0466..f898d35 100644 --- a/Unit Tests/Info.plist +++ b/Unit Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 0.10.1 + 0.10.2 CFBundleVersion 1