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
0f50f4f2
Unverified
Commit
0f50f4f2
authored
Jan 01, 2018
by
Zach Knox
Browse files
added note on Filter button to show user if filters are on or not
parent
68cb906d
Changes
1
Hide whitespace changes
Inline
Side-by-side
WhatsOpen/WhatsOpen/Views/FacilitiesListViewController.swift
View file @
0f50f4f2
...
...
@@ -114,9 +114,30 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
@IBAction
func
RefreshButton
(
_
sender
:
Any
)
{
refresh
(
sender
,
forceUpdate
:
true
)
}
func
checkFilterState
()
{
if
(
filters
.
showOpen
&&
filters
.
showClosed
&&
filters
.
openFirst
&&
filters
.
sortBy
==
SortMethod
.
alphabetical
)
{
for
f
in
filters
.
onlyFromCategories
{
if
(
f
.
value
!=
true
)
{
LeftButton
.
title
=
"Filter (On)"
return
}
}
for
f
in
filters
.
onlyFromLocations
{
if
(
f
.
value
!=
true
)
{
LeftButton
.
title
=
"Filter (On)"
return
}
}
LeftButton
.
title
=
"Filter"
return
}
LeftButton
.
title
=
"Filter (On)"
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
LastUpdatedLabel
.
isEnabled
=
false
checkFilterState
()
}
@objc
func
tapRecognizer
(
_
sender
:
UITapGestureRecognizer
)
{
...
...
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