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
68cb906d
Unverified
Commit
68cb906d
authored
Jan 01, 2018
by
Zach Knox
Browse files
move where the categories and locations are added to filters
parent
ded89a92
Changes
1
Hide whitespace changes
Inline
Side-by-side
WhatsOpen/WhatsOpen/Views/FacilitiesListViewController.swift
View file @
68cb906d
...
...
@@ -219,15 +219,7 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
refresh
(
self
,
forceUpdate
:
false
)
// Add locations and categories to filters
for
f
in
facilitiesArray
{
if
(
!
filters
.
onlyFromCategories
.
keys
.
contains
((
f
.
category
?
.
categoryName
)
!
))
{
filters
.
onlyFromCategories
.
updateValue
(
true
,
forKey
:
(
f
.
category
?
.
categoryName
)
!
)
}
if
(
!
filters
.
onlyFromLocations
.
keys
.
contains
((
f
.
facilityLocation
?
.
building
)
!
))
{
filters
.
onlyFromLocations
.
updateValue
(
true
,
forKey
:
(
f
.
facilityLocation
?
.
building
)
!
)
}
}
LocationsList
.
reloadData
()
...
...
@@ -310,6 +302,16 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
}
LocationsList
.
reloadData
()
// Add locations and categories to filters
for
f
in
facilitiesArray
{
if
(
!
filters
.
onlyFromCategories
.
keys
.
contains
((
f
.
category
?
.
categoryName
)
!
))
{
filters
.
onlyFromCategories
.
updateValue
(
true
,
forKey
:
(
f
.
category
?
.
categoryName
)
!
)
}
if
(
!
filters
.
onlyFromLocations
.
keys
.
contains
((
f
.
facilityLocation
?
.
building
)
!
))
{
filters
.
onlyFromLocations
.
updateValue
(
true
,
forKey
:
(
f
.
facilityLocation
?
.
building
)
!
)
}
}
refreshControl
.
endRefreshing
()
}
...
...
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