diff --git a/AHS/AHS/UI/profilePage/profilePage.swift b/AHS/AHS/UI/profilePage/profilePage.swift index a1c3e30..6f5d3f0 100644 --- a/AHS/AHS/UI/profilePage/profilePage.swift +++ b/AHS/AHS/UI/profilePage/profilePage.swift @@ -35,11 +35,11 @@ class profilePageViewController : mainPageViewController{ internal var scheduleViewHeight : CGFloat = 0; //static internal let optionsCellTitles = ["Notifications", "ID Card"]; -- with id card - static internal let optionsCellTitles = ["Notifications"]; - static internal let infoCellTitles = ["About Us", "Terms and Agreements", "App Version"]; + static internal let optionsCellTitles = [""]; + static internal let infoCellTitles = ["Dark Mode", "Notifications", "About Us", "Terms and Agreements", "App Version", "Sign out"]; //internal let tableViewContentViewControllers = [[notificationSettingsPageViewController(), idCardSettingsPageViewController()], [aboutUsPageViewController(), termsAndConditionsPageViewController()]]; -- with id card - internal let tableViewContentViewControllers = [[notificationSettingsPageViewController()], [aboutUsPageViewController(), termsAndConditionsPageViewController()]]; + internal let tableViewContentViewControllers = [[], [articlePageViewController.toggleUserInterface, notificationSettingsPageViewController(), aboutUsPageViewController(), termsAndConditionsPageViewController()]]; internal var contentTableViewCellTitles : [[String]] = []; // gets populated with optionsCellTitles and infoCellTitles internal var contentTableViewCellValues : [[String?]] = []; @@ -152,7 +152,7 @@ class profilePageViewController : mainPageViewController{ contentTableViewCellTitles = [profilePageViewController.optionsCellTitles, profilePageViewController.infoCellTitles]; contentTableViewCellValues = [Array(repeating: nil, count: profilePageViewController.optionsCellTitles.count), Array(repeating: nil, count: profilePageViewController.infoCellTitles.count)]; - contentTableViewCellValues[1][profilePageViewController.infoCellTitles.count - 1] = AppUtility.getAppVersionString(); // set app build number + contentTableViewCellValues[1][profilePageViewController.infoCellTitles.count - 2] = AppUtility.getAppVersionString(); // set app build number } internal func renderContent(){ diff --git a/AHS/AHS/UI/profilePage/profilePageActions.swift b/AHS/AHS/UI/profilePage/profilePageActions.swift index f4740f7..1bf6e4a 100644 --- a/AHS/AHS/UI/profilePage/profilePageActions.swift +++ b/AHS/AHS/UI/profilePage/profilePageActions.swift @@ -32,9 +32,9 @@ extension profilePageViewController{ internal func openTableViewPage(_ indexPath: IndexPath){ switch indexPath.section { case 1: - self.openPresentablePage(self.tableViewContentViewControllers[0][indexPath.row]); + self.openPresentablePage(self.tableViewContentViewControllers[0][indexPath.row] as! presentableViewController); case 2: - if indexPath.row < self.tableViewContentViewControllers[1].count{ self.openPresentablePage(self.tableViewContentViewControllers[1][indexPath.row]); + if indexPath.row < self.tableViewContentViewControllers[1].count{ self.openPresentablePage(self.tableViewContentViewControllers[1][indexPath.row] as! presentableViewController); } default: print("invalid indexPath section in profilePage"); diff --git a/AHS/AHS/UI/profilePage/profilePageTableView.swift b/AHS/AHS/UI/profilePage/profilePageTableView.swift index b587003..f442f7e 100644 --- a/AHS/AHS/UI/profilePage/profilePageTableView.swift +++ b/AHS/AHS/UI/profilePage/profilePageTableView.swift @@ -86,11 +86,7 @@ extension profilePageViewController: UITableViewDelegate, UITableViewDataSource var s : String = ""; switch section { case 0: - s += "Schedule"; - case 1: - s += "Options"; - case 2: - s += "Info"; + s += "Settings"; default: s = ""; } @@ -114,11 +110,7 @@ extension profilePageViewController: UITableViewDelegate, UITableViewDataSource cell.selectionStyle = .none; - if (indexPath.section == 0){ - cell.updateWithView(indexPath.section, scheduleView); - renderSchedule(); - } - else{ + if (indexPath.section != 0){ cell.updateWithButton(indexPath.section, title: contentTableViewCellTitles[indexPath.section - 1][indexPath.row], value: contentTableViewCellValues[indexPath.section - 1][indexPath.row]); }