Unverified Commit 4cfc4b0d authored by Zach Knox's avatar Zach Knox
Browse files

persistant campuses!

parent 5a827f03
...@@ -33,7 +33,7 @@ class Filters { ...@@ -33,7 +33,7 @@ class Filters {
let specifiedFacilities = List<Facility>() let specifiedFacilities = List<Facility>()
// facility must be within both a specified location and category // facility must be within both a specified location and category
for f in facilities { for f in facilities {
if(onlyFromLocations[(f.facilityLocation?.building)!.lowercased()] == true && onlyFromCategories[(f.category?.categoryName)!.lowercased()] == true && onlyFromCampuses[(f.facilityLocation?.campus)!.lowercased()] == true) { if onlyFromLocations[(f.facilityLocation?.building)!.lowercased()] == true && onlyFromCategories[(f.category?.categoryName)!.lowercased()] == true {
specifiedFacilities.append(f) specifiedFacilities.append(f)
} }
} }
......
...@@ -102,7 +102,7 @@ class FiltersTableViewController: UITableViewController { ...@@ -102,7 +102,7 @@ class FiltersTableViewController: UITableViewController {
case 2: case 2:
return SortMethod.count return SortMethod.count
case 3: case 3:
return 3 return 2
default: default:
return 0 return 0
} }
...@@ -231,22 +231,6 @@ class FiltersTableViewController: UITableViewController { ...@@ -231,22 +231,6 @@ class FiltersTableViewController: UITableViewController {
detail = "\(i) Selected" detail = "\(i) Selected"
} }
cell.detailTextLabel?.text = detail cell.detailTextLabel?.text = detail
case 2:
cell.textLabel?.text = "Campuses"
var i = 0
for c in filters.onlyFromCampuses {
if(c.value == true) {
i += 1
}
}
var detail: String
if(i == filters.onlyFromCampuses.count) {
detail = "All Selected"
}
else {
detail = "\(i) Selected"
}
cell.detailTextLabel?.text = detail
default: default:
return cell return cell
} }
......
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