diff --git a/ScienceJournal/UI/AboutViewController.swift b/ScienceJournal/UI/AboutViewController.swift index fae57ce..2b8e1a2 100644 --- a/ScienceJournal/UI/AboutViewController.swift +++ b/ScienceJournal/UI/AboutViewController.swift @@ -24,7 +24,6 @@ class AboutViewController: MaterialHeaderCollectionViewController { // MARK: - Data model enum AboutRow { - case website case licenses case version case privacy @@ -32,7 +31,6 @@ class AboutViewController: MaterialHeaderCollectionViewController { var title: String { switch self { - case .website: return String.settingsWebsiteTitle case .licenses: return String.settingsOpenSourceTitle case .version: return String.settingsVersionTitle case .privacy: return String.settingsPrivacyPolicyTitle @@ -42,7 +40,6 @@ class AboutViewController: MaterialHeaderCollectionViewController { var description: String? { switch self { - case .website: return "https://g.co/sciencejournal" case .licenses: return nil case .version: return Bundle.appVersionString case .privacy: return "https://www.google.com/policies/privacy/" @@ -52,7 +49,6 @@ class AboutViewController: MaterialHeaderCollectionViewController { var accessibilityLabel: String { switch self { - case .website: return String.settingsWebsiteTitle case .licenses: return String.settingsOpenSourceTitle case .version: return "\(String.settingsVersionTitle) \(self.description ?? "")" case .privacy: return String.settingsPrivacyPolicyTitle @@ -82,7 +78,6 @@ class AboutViewController: MaterialHeaderCollectionViewController { // MARK: - Datasource let rows: [AboutRow] = [ - .website, .licenses, .version, .privacy, @@ -166,7 +161,7 @@ class AboutViewController: MaterialHeaderCollectionViewController { didSelectItemAt indexPath: IndexPath) { let rowData = rows[indexPath.row] switch rowData { - case .website, .privacy, .terms: + case .privacy, .terms: if let stringURL = rowData.description, let url = URL(string: stringURL) { UIApplication.shared.open(url) } diff --git a/ScienceJournal/UI/SidebarViewController.swift b/ScienceJournal/UI/SidebarViewController.swift index e45a7f1..199b7db 100644 --- a/ScienceJournal/UI/SidebarViewController.swift +++ b/ScienceJournal/UI/SidebarViewController.swift @@ -26,7 +26,6 @@ protocol SidebarDelegate: class { /// Represents rows in the sidebar that provides titles and icons for each item. enum SidebarRow { case experiments - case website case settings case feedback case about @@ -34,7 +33,6 @@ enum SidebarRow { var title: String { switch self { case .experiments: return String.navigationItemExperiments - case .website: return String.navigationItemActivities case .settings: return String.navigationItemSettings case .feedback: return String.actionFeedback case .about: return String.actionAbout @@ -44,19 +42,11 @@ enum SidebarRow { var icon: String { switch self { case .experiments: return "ic_book_36pt" - case .website: return "ic_web_asset_36pt" case .settings: return "ic_settings_36pt" case .feedback: return "ic_feedback_36pt" case .about: return "ic_info_36pt" } } - - var accessoryIcon: String? { - switch self { - case .website: return "ic_open_in_browser" - default: return nil - } - } } /// Controls the contents of the sidebar menu and manages its appearance and disappearance. @@ -96,7 +86,6 @@ class SidebarViewController: UIViewController, UICollectionViewDelegate, UIColle let menuStructure: [SidebarRow] = [ .experiments, - .website, .settings, .feedback, .about @@ -410,11 +399,6 @@ class SidebarViewController: UIViewController, UICollectionViewDelegate, UIColle cell.titleLabel.text = cellData.title cell.accessibilityLabel = cell.titleLabel.text cell.iconView.image = UIImage(named: cellData.icon) - var accessoryImage: UIImage? - if let accessoryIcon = cellData.accessoryIcon { - accessoryImage = UIImage(named: accessoryIcon) - } - cell.accessoryIconView.image = accessoryImage } return cell } diff --git a/ScienceJournal/UI/UserFlowViewController.swift b/ScienceJournal/UI/UserFlowViewController.swift index 876c8d7..24ff574 100644 --- a/ScienceJournal/UI/UserFlowViewController.swift +++ b/ScienceJournal/UI/UserFlowViewController.swift @@ -386,11 +386,6 @@ class UserFlowViewController: UIViewController, ExperimentsListViewControllerDel aboutNavController.isNavigationBarHidden = true aboutNavController.modalPresentationStyle = .formSheet present(aboutNavController, animated: true) - case .website: - let websiteURL = - "https://makingscience.withgoogle.com/science-journal/activities?utm_source=app" - guard let url = URL(string: websiteURL) else { return } - UIApplication.shared.open(url) case .settings: let settingsVC = SettingsViewController(analyticsReporter: analyticsReporter, driveSyncManager: userManager.driveSyncManager,