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
c3ce5dba
Unverified
Commit
c3ce5dba
authored
Jan 24, 2018
by
Zach Knox
Browse files
fixed filter bugs and reset filters button
parent
c14347e3
Changes
5
Hide whitespace changes
Inline
Side-by-side
WhatsOpen/WhatsOpen.xcodeproj/project.pbxproj
View file @
c3ce5dba
...
...
@@ -233,6 +233,7 @@
isa
=
PBXNativeTarget
;
buildConfigurationList
=
CD81F52B1DC0334600009FBD
/* Build configuration list for PBXNativeTarget "WhatsOpen" */
;
buildPhases
=
(
92A4237E201190EA00010B73
/* ShellScript */
,
50D6F624F16EB519DDA7AD66
/* [CP] Check Pods Manifest.lock */
,
CD81F5151DC0334600009FBD
/* Sources */
,
CD81F5161DC0334600009FBD
/* Frameworks */
,
...
...
@@ -241,7 +242,6 @@
E09CBA67A9A59A8E148F3FE7
/* [CP] Copy Pods Resources */
,
92FF6C7820017E1C00D836AE
/* Run Script */
,
922C3C1B200306F5008E1146
/* ShellScript */
,
92A4237E201190EA00010B73
/* ShellScript */
,
);
buildRules
=
(
);
...
...
@@ -271,7 +271,7 @@
};
CD81F5181DC0334600009FBD
=
{
CreatedOnToolsVersion
=
8.0
;
DevelopmentTeam
=
N5GM564QWL
;
DevelopmentTeam
=
K5MMVK2UFR
;
LastSwiftMigration
=
0910
;
ProvisioningStyle
=
Automatic
;
};
...
...
WhatsOpen/WhatsOpen/Filters.swift
View file @
c3ce5dba
...
...
@@ -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
)
!
]
==
true
&&
onlyFromCategories
[(
f
.
category
?
.
categoryName
)
!
]
==
true
&&
onlyFromCampuses
[(
f
.
facilityLocation
?
.
campus
)
!
]
==
true
)
{
if
(
onlyFromLocations
[(
f
.
facilityLocation
?
.
building
)
!
.
lowercased
()
]
==
true
&&
onlyFromCategories
[(
f
.
category
?
.
categoryName
)
!
.
lowercased
()
]
==
true
&&
onlyFromCampuses
[(
f
.
facilityLocation
?
.
campus
)
!
.
lowercased
()
]
==
true
)
{
specifiedFacilities
.
append
(
f
)
}
}
...
...
WhatsOpen/WhatsOpen/Info.plist
View file @
c3ce5dba
...
...
@@ -23,7 +23,7 @@
<key>
CFBundleShortVersionString
</key>
<string>
1.0
</string>
<key>
CFBundleVersion
</key>
<string>
7
</string>
<string>
9
</string>
<key>
Fabric
</key>
<dict>
<key>
APIKey
</key>
...
...
WhatsOpen/WhatsOpen/Views/FacilitiesListViewController.swift
View file @
c3ce5dba
...
...
@@ -414,13 +414,13 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
// 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
)
!
)
filters
.
onlyFromCategories
.
updateValue
(
true
,
forKey
:
(
f
.
category
?
.
categoryName
)
!
.
lowercased
()
)
}
if
(
!
filters
.
onlyFromLocations
.
keys
.
contains
((
f
.
facilityLocation
?
.
building
)
!
))
{
filters
.
onlyFromLocations
.
updateValue
(
true
,
forKey
:
(
f
.
facilityLocation
?
.
building
)
!
)
filters
.
onlyFromLocations
.
updateValue
(
true
,
forKey
:
(
f
.
facilityLocation
?
.
building
)
!
.
lowercased
()
)
}
if
(
!
filters
.
onlyFromCampuses
.
keys
.
contains
((
f
.
facilityLocation
?
.
campus
)
!
))
{
filters
.
onlyFromCampuses
.
updateValue
(
true
,
forKey
:
(
f
.
facilityLocation
?
.
campus
)
!
)
filters
.
onlyFromCampuses
.
updateValue
(
true
,
forKey
:
(
f
.
facilityLocation
?
.
campus
)
!
.
lowercased
()
)
}
}
}
...
...
WhatsOpen/WhatsOpen/Views/FiltersTableViewController.swift
View file @
c3ce5dba
...
...
@@ -28,7 +28,10 @@ class FiltersTableViewController: UITableViewController {
for
v
in
l
{
l
.
updateValue
(
true
,
forKey
:
v
.
key
)
}
filters
=
Filters
()
filters
.
openFirst
=
true
filters
.
showClosed
=
true
filters
.
showOpen
=
true
filters
.
sortBy
=
.
alphabetical
filters
.
onlyFromCategories
=
c
filters
.
onlyFromLocations
=
l
tableView
.
reloadData
()
...
...
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