Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open-ios
Commits
4cfc4b0d
Unverified
Commit
4cfc4b0d
authored
Feb 16, 2018
by
Zach Knox
Browse files
persistant campuses!
parent
5a827f03
Changes
2
Hide whitespace changes
Inline
Side-by-side
WhatsOpen/WhatsOpen/Filters.swift
View file @
4cfc4b0d
...
...
@@ -33,7 +33,7 @@ class Filters {
let
specifiedFacilities
=
List
<
Facility
>
()
// facility must be within both a specified location and category
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
)
}
}
...
...
WhatsOpen/WhatsOpen/Views/FiltersTableViewController.swift
View file @
4cfc4b0d
...
...
@@ -102,7 +102,7 @@ class FiltersTableViewController: UITableViewController {
case
2
:
return
SortMethod
.
count
case
3
:
return
3
return
2
default
:
return
0
}
...
...
@@ -231,22 +231,6 @@ class FiltersTableViewController: UITableViewController {
detail
=
"
\(
i
)
Selected"
}
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
:
return
cell
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment